/**
 * Dashboard header + hero: transparent bar in normal flow (not fixed), dark pages.
 * --ebc-hero-map: enqueued in functions.php. Accent: #3b82f6 only.
 *
 * @package EveryCountry
 */

/* -------------------------------------------------------------------------
 * Header (template part) — transparent, not sticky/fixed, same on all templates
 * ------------------------------------------------------------------------- */
/* Match hero, explore, glass progress: spacing--50 gutters + 80rem inner column (see .ebc-home-hero__main, .ebc-hero-progress) */
.ebc-header--dashboard {
	width: 100%;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: var( --wp--preset--spacing--50 ) !important;
	padding-right: var( --wp--preset--spacing--50 ) !important;
	box-sizing: border-box;
	position: relative;
	z-index: 10;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: none;
	border-bottom: 1px solid rgba( 255, 255, 255, 0.06 );
	color: #f8fafc;
}

.ebc-header--dashboard .ebc-header__bar {
	width: 100% !important;
	max-width: 80rem;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	box-sizing: border-box;
	background: transparent !important;
	background-color: transparent !important;
}

/* Core / theme global styles may add .has-background or color presets on the group. */
.wp-block-group.ebc-header.ebc-header--dashboard,
.wp-block-group.ebc-header.ebc-header--dashboard.has-background {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
}

/* Site title: don’t break mid-phrase on mid-width; nav still wraps */
.ebc-header--dashboard .ebc-header__bar .wp-block-site-title a {
	white-space: nowrap;
}

@media ( max-width: 700px ) {
	.ebc-header--dashboard .ebc-header__bar .wp-block-site-title a {
		white-space: normal;
	}
}

/* alignfull: keep background full width; padding above handles alignment */
.ebc-header--dashboard.wp-block-group.alignfull {
	width: 100%;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}

.ebc-header__bar {
	gap: 1rem;
}

.ebc-header--dashboard .wp-block-site-title a {
	color: #fff !important;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ebc-header--dashboard .ebc-header__bar .wp-block-site-title a:hover,
.ebc-header--dashboard .ebc-header__bar .wp-block-site-title a:focus {
	color: #3b82f6 !important;
}

.ebc-header--dashboard .ebc-header__bar .wp-block-site-title,
.ebc-header--dashboard .ebc-header__bar .wp-block-site-title a {
	font-size: 0.95rem;
	font-weight: 600;
}

.ebc-header__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.4rem 1.25rem;
}

.ebc-header__link {
	color: #fff;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	transition: color 0.2s ease;
}

.ebc-header__link:hover,
.ebc-header__link:focus {
	color: #3b82f6;
}

.ebc-header__login {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.4em 1.1em;
	font-size: 0.9rem;
	font-weight: 600;
	color: #fff !important;
	text-decoration: none;
	background: #3b82f6;
	border-radius: 6px;
	border: 1px solid #3b82f6;
	transition: filter 0.2s ease, background 0.2s ease;
}

.ebc-header__login:hover,
.ebc-header__login:focus {
	color: #fff !important;
	filter: brightness( 1.08 );
}

/* -------------------------------------------------------------------------
 * Hero shell — 80–100vh, map stack, column layout
 * ------------------------------------------------------------------------- */
.wp-block-group.ebc-home-hero.ebc-home-hero--dashboard.ebc-home-hero--travel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: min( 100vh, 100dvh );
	max-height: none;
	margin: 0 !important;
	padding: 0 !important;
	/* Clips map layers; bottom gap uses .ebc-home-hero__shell padding, not child margin (margins can clip) */
	overflow: hidden;
	color: #fff;
	background-color: #1a212a !important;
	background-image: none !important;
	border: none;
}

/* World map (upload JPEG / fallback) — base fill is solid #1a212a, same as .ebc-explore */
.wp-block-group.ebc-home-hero.ebc-home-hero--dashboard.ebc-home-hero--travel::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-image: var( --ebc-hero-map, url( "../images/ebc-world-map-overlay.svg" ) );
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.4;
	filter: brightness( 1.15 ) contrast( 0.95 ) grayscale( 0.35 ) blur( 0.5px );
}

.wp-block-group.ebc-home-hero.ebc-home-hero--dashboard.ebc-home-hero--travel > * {
	position: relative;
	z-index: 2;
}

.ebc-home-hero--dashboard .ebc-home-hero__shell {
	display: flex;
	flex-direction: column;
	min-height: min( 100vh, 100dvh );
	flex: 1;
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	/* Extra top padding clears the overlapped header; --ebc-header-overlap is on body.ebc-front-hero. */
	padding-top: calc(
		var( --ebc-header-overlap, 4.75rem ) + var( --wp--preset--spacing--50, 1.5rem ) + env( safe-area-inset-top, 0px )
	) !important;
	/* Space above next section: margin on .ebc-hero-progress is clipped by hero overflow; use padding */
	padding-bottom: calc( 50px + env( safe-area-inset-bottom, 0px ) ) !important;
	/* matches .ebc-explore side inset (var(--wp--preset--spacing--50)) + inner 80rem below */
	padding-left: var( --wp--preset--spacing--50 ) !important;
	padding-right: var( --wp--preset--spacing--50 ) !important;
	box-sizing: border-box;
}

.ebc-home-hero--dashboard .ebc-home-hero__main {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	min-height: 0;
	/* line up with .ebc-explore__inner (max 80rem inside same side padding) */
	max-width: 80rem;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

/* Left column: headline + search as primary; wider for search */
.ebc-home-hero--dashboard .ebc-home-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	max-width: min( 100%, 48rem );
	gap: 0;
}

.ebc-home-hero--dashboard .ebc-home-hero__title {
	margin: 0;
	font-size: clamp( 2.1rem, 5vw, 3.4rem ) !important;
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: #fff !important;
	text-align: left !important;
}

.ebc-home-hero--dashboard .ebc-home-hero__accent {
	color: #3b82f6;
}

.ebc-home-hero--dashboard .ebc-home-hero__subtitle {
	margin: 0 0 1.75rem !important;
	font-size: clamp( 1.05rem, 2.1vw, 1.2rem ) !important;
	line-height: 1.5 !important;
	color: rgba( 255, 255, 255, 0.9 ) !important;
	opacity: 1 !important;
	text-align: left !important;
	max-width: 40ch;
}

/* ——— Hero country search (primary) ——— */
.ebc-home-hero__search {
	position: relative;
	z-index: 6;
	width: 100%;
	margin: 0 0 1.5rem;
}

.ebc-home-hero__search-form {
	margin: 0;
	width: 100%;
}

.ebc-home-hero__search-row {
	display: flex;
	align-items: stretch;
	gap: 0.65rem 0.75rem;
	flex-wrap: wrap;
}

.ebc-home-hero__search-field {
	position: relative;
	flex: 1 1 12rem;
	min-width: 0;
}

.ebc-home-hero__search-input {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 0.9rem 1.1rem;
	font-size: clamp( 1.05rem, 1.8vw, 1.2rem ) !important;
	line-height: 1.35;
	color: #f8fafc !important;
	background: #1f2937 !important;
	border: 1px solid rgba( 255, 255, 255, 0.1 ) !important;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.2 );
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.ebc-home-hero__search-input::placeholder {
	color: rgba( 203, 213, 225, 0.45 ) !important;
}

.ebc-home-hero__search-input:hover {
	border-color: rgba( 255, 255, 255, 0.16 ) !important;
}

.ebc-home-hero__search-input:focus {
	outline: none;
	border-color: #3b82f6 !important;
	box-shadow: 0 0 0 3px rgba( 59, 130, 246, 0.25 ), 0 4px 20px rgba( 0, 0, 0, 0.25 );
}

.ebc-home-hero__search-go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 0.85rem 1.35rem;
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #fff !important;
	background: #3b82f6 !important;
	border: 1px solid #3b82f6;
	border-radius: 10px;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba( 59, 130, 246, 0.35 );
	transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.ebc-home-hero__search-go:hover,
.ebc-home-hero__search-go:focus {
	filter: brightness( 1.06 );
	outline: none;
}

.ebc-home-hero__suggestions {
	position: absolute;
	z-index: 50;
	left: 0;
	right: 0;
	top: 100%;
	margin: 0.35rem 0 0;
	padding: 0.4rem 0;
	list-style: none;
	background: #1f2937;
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba( 0, 0, 0, 0.45 );
	max-height: min( 50vh, 16rem );
	overflow-y: auto;
}

.ebc-home-hero__suggest-item {
	margin: 0;
	padding: 0.55rem 1rem;
	font-size: 0.95rem;
	line-height: 1.4;
	color: #e2e8f0 !important;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	cursor: pointer;
	transition: background 0.1s ease;
}

.ebc-home-hero__suggest-item:hover,
.ebc-home-hero__suggest-item:focus {
	background: rgba( 59, 130, 246, 0.15 );
	outline: none;
}

.ebc-home-hero__suggest-item--visited .ebc-home-hero__suggest-st {
	color: #60a5fa !important;
}

.ebc-home-hero__suggest-main {
	color: #f8fafc;
}

.ebc-home-hero__suggest-st {
	flex-shrink: 0;
	margin-left: auto;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #94a3b8 !important;
}

.ebc-home-hero__suggest-empty {
	margin: 0;
	padding: 0.55rem 1rem;
	font-size: 0.9rem;
	color: #94a3b8 !important;
}

.ebc-home-hero__search-hint {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	color: #f59e0b !important;
}

.ebc-home-hero__search-hint:empty {
	min-height: 0;
	margin: 0;
	padding: 0;
}

.ebc-home-hero__search-hint:not( :empty ) {
	min-height: 1.3em;
}

.ebc-home-hero__quick {
	margin: 0.35rem 0 0;
	font-size: 0.92rem;
	line-height: 1.6;
	color: rgba( 226, 232, 240, 0.75 ) !important;
}

.ebc-home-hero__quick-label {
	margin-right: 0.25rem;
	font-weight: 600;
	color: rgba( 248, 250, 252, 0.65 ) !important;
}

.ebc-home-hero__quick-sep {
	margin: 0 0.35rem;
	color: rgba( 148, 163, 184, 0.45 );
	user-select: none;
}

.ebc-home-hero__quick-link {
	color: #93c5fd !important;
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.ebc-home-hero__quick-link:hover,
.ebc-home-hero__quick-link:focus {
	color: #3b82f6 !important;
	border-bottom-color: rgba( 59, 130, 246, 0.45 );
	outline: none;
}

/* Legacy: hide removed “View Dashboard” block if it still exists in saved page HTML. */
.ebc-home-hero__actions--secondary {
	display: none !important;
}

/* -------------------------------------------------------------------------
 * Glass progress panel (inside hero)
 * ------------------------------------------------------------------------- */
.ebc-hero-progress {
	margin-top: auto;
	width: 100%;
	max-width: 80rem;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 0;
	padding: 0;
}

.ebc-hero-progress__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem 1.5rem;
	align-items: center;
	padding: 1.1rem 1.25rem;
	border-radius: 12px;
	background: rgba( 255, 255, 255, 0.05 );
	backdrop-filter: blur( 14px );
	-webkit-backdrop-filter: blur( 14px );
	border: 1px solid rgba( 255, 255, 255, 0.12 );
	box-shadow: 0 4px 24px rgba( 0, 0, 0, 0.2 );
}

@media ( min-width: 768px ) {
	.ebc-hero-progress__inner {
		grid-template-columns: minmax( 10rem, 1.1fr ) 2fr minmax( 9rem, 0.9fr );
		gap: 1.25rem 2rem;
		padding: 1.1rem 1.5rem;
	}
}

.ebc-hero-progress__left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.ebc-hero-progress__icon {
	display: flex;
	color: #3b82f6;
	flex-shrink: 0;
}

.ebc-hero-progress__icon svg {
	width: 2.3rem;
	height: 2.3rem;
}

.ebc-hero-progress__value {
	margin: 0;
	font-size: 1.45rem;
	font-weight: 800;
	color: #fff;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.ebc-hero-progress__label {
	margin: 0.15rem 0 0;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba( 255, 255, 255, 0.65 );
}

.ebc-hero-progress__center {
	min-width: 0;
}

.ebc-hero-progress__pct {
	margin: 0 0 0.4rem;
	font-size: 0.8rem;
	color: rgba( 255, 255, 255, 0.6 );
}

.ebc-hero-progress__bar {
	height: 10px;
	border-radius: 6px;
	background: rgba( 255, 255, 255, 0.12 );
	box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.15 );
	overflow: hidden;
}

.ebc-hero-progress__fill {
	height: 100%;
	width: 0;
	min-width: 4px;
	border-radius: 4px;
	background: #3b82f6;
	box-shadow: 0 0 8px rgba( 59, 130, 246, 0.45 );
}

.ebc-hero-progress__journey {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.4;
	color: rgba( 255, 255, 255, 0.88 );
	text-align: left;
}

@media ( min-width: 768px ) {
	.ebc-hero-progress__journey {
		text-align: right;
	}
}

/* ------------------------------------------------------------------------- Mobile
 * ------------------------------------------------------------------------- */
@media ( max-width: 600px ) {
	/* Same gutter as .ebc-home-hero__shell on small screens (align with hero + bar) */
	.ebc-header--dashboard,
	.ebc-header.ebc-header--dashboard {
		padding-left: var( --wp--preset--spacing--40, 1.25rem ) !important;
		padding-right: var( --wp--preset--spacing--40, 1.25rem ) !important;
	}

	.ebc-home-hero--dashboard .ebc-home-hero__shell {
		padding-left: var( --wp--preset--spacing--40, 1.25rem ) !important;
		padding-right: var( --wp--preset--spacing--40, 1.25rem ) !important;
	}

	.ebc-header__nav {
		width: 100%;
		justify-content: flex-start;
	}

	.ebc-home-hero__search-row {
		flex-direction: column;
	}

	.ebc-home-hero__search-go {
		width: 100%;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.ebc-header__link,
	.ebc-header__login,
	.ebc-home-hero__search-go {
		transition: none;
	}
}

@media ( prefers-reduced-transparency: reduce ) {
	.ebc-hero-progress__inner {
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		background: rgba( 12, 16, 24, 0.88 );
	}
}
