/**
 * Header Styles - Mobile First
 * 
 * Uses Palette A CSS variables for consistent theming
 * Mobile-first approach: styles for mobile, then desktop enhancements
 *
 * @package Garage_At_Home
 */

/* Palette A CSS Variables */
:root {
	--gh-bg: #0F1113;
	--gh-surface: #141618;
	--gh-accent: #C62828;
	--gh-accent-2: #FF6F61;
	--gh-text: #F5F6F7;
	--gh-muted: #BFC4C6;
	--gh-success: #2ECC71;
}

/* Topbar */
.gh-topbar {
	background-color: var(--gh-surface);
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	color: var(--gh-muted);
	display: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	text-align: right;
}

.gh-topbar.visible {
	display: block;
}

.gh-topbar-content {
	max-width: 1200px;
	margin: 0 auto;
	margin-left: auto;
	margin-right: 0;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	width: 100%;
}

.gh-topbar-contact {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1.5rem;
	flex-wrap: wrap;
	margin-left: auto;
}

.gh-topbar-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--gh-text);
	text-decoration: none;
	padding: 0.375rem 0.75rem;
	border-radius: 4px;
	transition: all 0.2s ease;
	font-size: 0.875rem;
	line-height: 1.4;
}

.gh-topbar-link:hover,
.gh-topbar-link:focus {
	color: var(--gh-accent-2);
	background-color: rgba(255, 111, 97, 0.1);
	outline: 2px solid var(--gh-accent-2);
	outline-offset: 2px;
	transform: translateY(-1px);
}

.gh-topbar-link:active {
	transform: translateY(0);
}

.gh-topbar-icon {
	flex-shrink: 0;
	color: var(--gh-accent-2);
	transition: color 0.2s ease, transform 0.2s ease;
}

.gh-topbar-link:hover .gh-topbar-icon,
.gh-topbar-link:focus .gh-topbar-icon {
	color: var(--gh-accent-2);
	transform: scale(1.1);
}

.gh-topbar-link span {
	white-space: nowrap;
}

/* Ensure email is always visible */
.gh-topbar-email span {
	display: inline;
}

.gh-topbar-separator {
	width: 1px;
	height: 16px;
	background-color: rgba(191, 196, 198, 0.3);
	margin: 0;
	display: block;
}

/* Mobile Responsive Styles for Topbar */
@media (max-width: 767px) {
	.gh-topbar {
		padding: 0.5rem 0.75rem;
		font-size: 0.7rem;
		text-align: right;
	}
	
	.gh-topbar-content {
		justify-content: flex-end !important;
		align-items: center;
		gap: 0.5rem;
		margin-left: auto;
		margin-right: 0;
		width: 100%;
	}
	
	.gh-topbar-contact {
		gap: 0.5rem;
		flex-wrap: nowrap;
		justify-content: flex-end !important;
		align-items: center;
		margin-left: auto;
		margin-right: 0;
	}
	
	.gh-topbar-link {
		padding: 0.25rem 0.4rem;
		font-size: 0.7rem;
		gap: 0.3rem;
		flex-shrink: 0;
		white-space: nowrap;
	}
	
	/* Show email text on mobile - make it responsive */
	.gh-topbar-email span {
		display: inline;
		font-size: 0.7rem;
		white-space: nowrap;
	}
	
	.gh-topbar-email {
		padding: 0.25rem 0.4rem;
		min-width: auto;
		flex-shrink: 0;
	}
	
	/* Keep phone number visible but prevent wrapping */
	.gh-topbar-phone {
		flex-shrink: 0;
	}
	
	.gh-topbar-phone span {
		display: inline;
		font-size: 0.7rem;
		white-space: nowrap;
	}
	
	.gh-topbar-separator {
		height: 14px;
		flex-shrink: 0;
	}
	
	.gh-topbar-icon {
		width: 14px;
		height: 14px;
		flex-shrink: 0;
	}
}

/* Extra small screens - further optimization */
@media (max-width: 480px) {
	.gh-topbar {
		padding: 0.4rem 0.5rem;
		font-size: 0.65rem;
	}
	
	.gh-topbar-content {
		gap: 0.4rem;
	}
	
	.gh-topbar-contact {
		gap: 0.4rem;
	}
	
	.gh-topbar-link {
		padding: 0.2rem 0.35rem;
		font-size: 0.65rem;
		gap: 0.25rem;
	}
	
	.gh-topbar-phone span {
		font-size: 0.65rem;
	}
	
	.gh-topbar-email span {
		font-size: 0.65rem;
	}
	
	.gh-topbar-icon {
		width: 13px;
		height: 13px;
	}
}

/* Header Container */
.gh-header {
	background-color: var(--gh-bg);
	padding: 0;
	border-bottom: 1px solid var(--gh-surface);
	position: relative;
	z-index: 1000;
	width: 100%;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.gh-header-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.625rem 1rem;
	display: flex !important;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	position: relative;
	background-color: var(--gh-bg);
	visibility: visible !important;
	opacity: 1 !important;
	flex-direction: row !important;
	pointer-events: auto !important;
	min-height: 60px;
}

/* Ensure header content doesn't block clicks on mobile */
@media (max-width: 767px) {
	.gh-header-content {
		pointer-events: auto !important;
		z-index: 1000 !important;
	}
}

/* Logo - Left Side */
.gh-logo {
	display: flex !important;
	align-items: center;
	text-decoration: none;
	font-size: 1.125rem;
	font-weight: bold;
	color: var(--gh-text) !important;
	z-index: 1001;
	transition: opacity 0.2s;
	order: 1 !important;
	flex-shrink: 0;
	visibility: visible !important;
	opacity: 1 !important;
	margin-right: auto;
}

.gh-logo:hover {
	opacity: 0.8;
}

.gh-logo:focus {
	outline: 2px solid var(--gh-accent-2);
	outline-offset: 2px;
	border-radius: 2px;
}

.gh-logo img {
	max-height: 32px;
	width: auto;
	display: block;
}

.gh-logo-text {
	display: block;
}

/* Menu Header/Title (optional - can be added later) */
.gh-menu-header {
	padding: 0 1.5rem 1.5rem 1.5rem;
	border-bottom: 1px solid var(--gh-surface);
	margin-bottom: 1rem;
}

.gh-menu-title {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--gh-text);
	margin: 0;
	text-align: left;
}

/* Screen Reader Text */
.gh-screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}
