/* ----------------------------------------------------------------
	Custom CSS - Mobile Optimization & Modern UI Polish
	Mole & Skin Tracker
-----------------------------------------------------------------*/

/* 1. Global Viewport & Overflow Safety */
html, body {
	overflow-x: hidden;
	-webkit-text-size-adjust: 100%;
}

/* 2. Mobile Bottom Spacing for Sticky Bar & iPhone Safe Area */
@media (max-width: 991.98px) {
	body {
		padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px)) !important;
	}
	#mobile-sticky-bar {
		padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
		padding-top: 10px;
	}
}

/* 3. Mobile Hamburger Menu Polish */
@media (max-width: 991.98px) {
	#header.dark #header-wrap {
		background-color: #102a43 !important;
	}
	.primary-menu .menu-container {
		background-color: #0b1d33 !important;
		border-top: 1px solid rgba(255,255,255,0.1) !important;
		padding: 15px 0 !important;
	}
	.primary-menu .menu-item > .menu-link {
		color: #ffffff !important;
		padding: 12px 25px !important;
		font-size: 15px !important;
		font-weight: 500 !important;
		border-bottom: 1px solid rgba(255,255,255,0.05);
		display: flex;
		align-items: center;
		min-height: 46px;
	}
	.primary-menu .menu-item > .menu-link:hover,
	.primary-menu .menu-item > .menu-link:focus {
		background-color: rgba(37,99,235,0.15) !important;
		color: #60a5fa !important;
	}
	.primary-menu .menu-item:last-child > .menu-link {
		border-bottom: none;
	}
}

/* 4. Touch Targets & Form Inputs on Mobile */
button, .btn, .button, .badge {
	touch-action: manipulation;
}

input, select, textarea {
	font-size: 16px !important; /* Prevents iOS Safari auto-zoom on input focus */
}

/* 5. Responsive Tables & Media Containers */
.table-responsive-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 1.5rem;
}

img {
	max-width: 100%;
	height: auto;
}

/* 6. Typography Scalability on Mobile */
@media (max-width: 767.98px) {
	h1 {
		font-size: 26px !important;
		line-height: 1.3 !important;
	}
	h2 {
		font-size: 22px !important;
		line-height: 1.35 !important;
	}
	h3 {
		font-size: 19px !important;
		line-height: 1.4 !important;
	}
	.lead {
		font-size: 15.5px !important;
		line-height: 1.6 !important;
	}
	.policy-body, .article-body, .entry-content {
		font-size: 15.5px !important;
		line-height: 1.7 !important;
	}
	.container {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
}

/* 7. Card & Widget Hover Resilience on Mobile */
@media (hover: none) and (pointer: coarse) {
	.app-showcase-card:hover,
	.card:hover {
		transform: none !important;
	}
}

/* 8. 2-Column Language Selector Grid & High-Contrast Scrollbars */
.sub-menu-container.lang-grid {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	min-width: 300px !important;
	padding: 10px !important;
	gap: 4px !important;
	box-shadow: 0 15px 35px rgba(0,0,0,0.3) !important;
	border: 1px solid rgba(255,255,255,0.18) !important;
}

.sub-menu-container.lang-grid .menu-item {
	float: none !important;
	width: 100% !important;
}

.sub-menu-container.lang-grid .menu-link {
	padding: 7px 12px !important;
	font-size: 13px !important;
	border-radius: 8px !important;
	transition: all 0.2s ease !important;
	white-space: nowrap !important;
}

.sub-menu-container.lang-grid .menu-link:hover {
	background-color: rgba(37,99,235,0.25) !important;
	color: #60a5fa !important;
	transform: translateX(2px);
}

/* Custom Scrollbar for all dark dropdowns */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 4px;
}
::-webkit-scrollbar-thumb {
	background: #3b82f6;
	border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
	background: #60a5fa;
}
