/*
Theme Name: DentalDesk
Theme URI: https://dentaldesk.dk
Author: DentalDesk
Author URI: https://dentaldesk.dk
Description: Moderne Tailwind-baseret tema til DentalDesk AI-receptionist.
Version: 0.1.0
Text Domain: dentaldesk
*/

/* Critical base styles - ensures visibility before Tailwind loads */
* {
	box-sizing: border-box;
	border: 0;
	border-style: solid;
}

html {
	background-color: #F5F5F3 !important;
}

body {
	background-color: #F5F5F3 !important;
	color: #111827 !important;
	font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: 1;
}

/* Ensure text is visible */
h1, h2, h3, h4, h5, h6, p, a, span, li, div {
	color: #111827 !important;
}

/* Keep the WordPress admin bar readable on dark background */
.admin-bar #wpadminbar,
.admin-bar #wpadminbar * {
	color: #fff !important;
	fill: #fff !important;
}

/* Brand colors as CSS variables for fallback */
:root {
	--brand-primary: #4F7C68;
	--brand-primary-dark: #3B6151;
	--brand-sage: #96A78D;
	--brand-mint: #D9E9CF;
	--brand-base: #F5F5F3;
	--brand-text: #111827;
	--brand-accent: #F3B86B;
}

/* Reset WordPress default styles */
body,
html {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-top: none !important;
	outline: none !important;
}


/* Ensure main content starts at the very top */
main#top {
	margin-top: 0 !important;
	padding-top: 0 !important;
	border: none !important;
}

/* Remove any gap at top */
body > *:first-child {
	margin-top: 0 !important;
}

/* Fix WordPress admin bar pushing content */
html {
	margin-top: 0 !important;
}

/* Ensure main content area has background and no gap */
main {
	background-color: #F5F5F3;
	min-height: 100vh;
	margin: 0 !important;
	/* padding: 0 !important; - Removed to allow Tailwind padding classes */
	/* Add padding-top to account for fixed header - extra space */
	padding-top: 72px; /* Mobile header height + extra space */
}

/* Desktop: larger header height + extra space */
@media (min-width: 640px) {
	main {
		padding-top: 80px; /* Desktop header height + extra space */
	}
}

/* Account for WordPress admin bar */
.admin-bar main {
	padding-top: 104px; /* 72px + 32px admin bar */
}

@media (min-width: 640px) {
	.admin-bar main {
		padding-top: 112px; /* 80px + 32px admin bar */
	}
}

@media screen and (max-width: 782px) {
	.admin-bar main {
		padding-top: 118px; /* 72px + 46px admin bar */
	}
}

/* Front page hero section - doesn't need extra padding since it has its own */
main#main-content {
	padding-top: 0;
}

/* Hero section starts at very top - only for landing page */
main#top > section:first-child,
.aurora-hero-section {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* Links should be visible */
a {
	color: #4F7C68;
	text-decoration: none;
}

a:hover {
	color: #3B6151;
}

/* Buttons */
button,
a.button,
input[type="submit"] {
	background-color: #4F7C68;
	color: white;
	padding: 0.75rem 1.5rem;
	border-radius: 9999px;
	border: none;
	cursor: pointer;
	font-weight: 600;
}

button:hover,
a.button:hover,
input[type="submit"]:hover {
	background-color: #3B6151;
}

/* ================================================
   DentalDesk Header Styles
   ================================================ */

/* Skip Link - Accessibility */
.dd-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	padding: 0.5rem 1rem;
	background: var(--brand-primary);
	color: white !important;
	z-index: 9999;
	font-weight: 600;
	text-decoration: none;
	border-radius: 0 0 0.25rem 0;
}

.dd-skip-link:focus {
	left: 0;
	outline: 2px solid white;
	outline-offset: 2px;
}

/* Header Base */
#site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background: #ffffff;
	/* Removed backdrop-filter and transitions completely for maximum performance */
	border-bottom: none;
	width: 100%;
	box-sizing: border-box;
	/* Performance optimizations */
	contain: layout style paint; /* Isolate header rendering */
	transform: translateZ(0); /* Force GPU acceleration */
	-webkit-transform: translateZ(0);
	/* Prevent repaints */
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

/* Account for WordPress admin bar when logged in */
.admin-bar #site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar #site-header {
		top: 46px;
	}
}

#site-header.scrolled {
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	background: #ffffff;
	/* Solid background - no transparency, no transitions for maximum performance */
}

/* Header Inner Container */
.dd-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.75rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	width: 100%;
	min-height: 56px;
}

@media (min-width: 640px) {
	.dd-header-inner {
		padding: 0.875rem 1.5rem;
		min-height: 64px;
	}
}

/* Logo */
.dd-logo {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	text-decoration: none;
	flex-shrink: 0;
	z-index: 1;
	position: relative;
	min-width: 0;
}

.dd-logo-icon {
	width: 2.25rem;
	height: 2.25rem;
	background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
	border-radius: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white !important;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: -0.025em;
}

.dd-logo-text {
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--brand-text) !important;
	letter-spacing: -0.025em;
	white-space: nowrap;
}

@media (min-width: 640px) {
	.dd-logo-text {
		font-size: 1.25rem;
	}
}

/* Desktop Navigation */
.dd-nav-desktop {
	display: none;
	gap: 1.5rem;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	align-items: center;
	white-space: nowrap;
}

@media (min-width: 768px) {
	.dd-nav-desktop {
		display: flex;
		gap: 2rem;
	}
}

@media (min-width: 1024px) {
	.dd-nav-desktop {
		gap: 2.5rem;
	}
}

.dd-nav-desktop a {
	font-family: 'Inter', sans-serif;
	font-size: 0.875rem;
	font-weight: 500;
	color: #4B5563 !important;
	text-decoration: none;
	transition: color 0.2s ease;
	position: relative;
	white-space: nowrap;
}

@media (min-width: 768px) {
	.dd-nav-desktop a {
		font-size: 0.9375rem;
	}
}

.dd-nav-desktop a:hover {
	color: var(--brand-primary) !important;
}

.dd-nav-desktop a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--brand-primary);
	transition: width 0.2s ease;
}

.dd-nav-desktop a:hover::after {
	width: 100%;
}

/* Header CTA Section */
.dd-header-cta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
	margin-left: auto;
}

@media (min-width: 768px) {
	.dd-header-cta {
		gap: 1rem;
	}
}

/* CTA Button */
.dd-btn-header {
	display: none;
	padding: 0.625rem 1.25rem;
	background: var(--brand-primary);
	color: white !important;
	font-family: 'Inter', sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 0.5rem;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
	.dd-btn-header {
		display: inline-flex;
	}
}

.dd-btn-header:hover {
	background: var(--brand-primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(79, 124, 104, 0.3);
}

/* Mobile Toggle Button */
.dd-mobile-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0.5rem;
	cursor: pointer;
	color: var(--brand-text);
	transition: background 0.2s ease;
	z-index: 1;
	position: relative;
	flex-shrink: 0;
}

.dd-mobile-toggle:hover {
	background: rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
	.dd-mobile-toggle {
		display: none;
	}
}

/* Mobile Menu */
.dd-mobile-menu {
	display: none;
	flex-direction: column;
	padding: 0.5rem 1rem 1rem;
	background: white;
	border-top: 1px solid rgba(0, 0, 0, 0.05);
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 998;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	max-height: calc(100vh - 56px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.dd-mobile-menu.active {
	display: flex;
}

@media (min-width: 640px) {
	.dd-mobile-menu {
		padding: 0.5rem 1.5rem 1.5rem;
		max-height: calc(100vh - 64px);
	}
}

@media (min-width: 768px) {
	.dd-mobile-menu {
		display: none !important;
	}
}

.dd-mobile-menu a {
	padding: 0.875rem 0;
	font-family: 'Inter', sans-serif;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--brand-text) !important;
	text-decoration: none;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	transition: color 0.2s ease;
	display: block;
	width: 100%;
}

.dd-mobile-menu a:last-child {
	border-bottom: none;
}

@media (min-width: 640px) {
	.dd-mobile-menu a {
		font-size: 1rem;
	}
}

.dd-mobile-menu a:hover {
	color: var(--brand-primary) !important;
}

.dd-mobile-menu .dd-mobile-cta {
	margin-top: 0.75rem;
	padding: 0.875rem 1.5rem;
	background: var(--brand-primary);
	color: white !important;
	text-align: center;
	border-radius: 0.5rem;
	border-bottom: none;
	font-weight: 600;
}

.dd-mobile-menu .dd-mobile-cta:hover {
	background: var(--brand-primary-dark);
	color: white !important;
}

/* Offset body content for fixed header - removed to eliminate spacing */
body {
	padding-top: 0 !important;
}
}

