/* ==========================================================================
   Andmehunt — komponentide CSS
   theme.json haldab valdava enamuse stiilidest. Siin ainult need stylid
   mida block editor ei toeta natively.
   ========================================================================== */

:root {
	--ah-bg-deep: var(--wp--preset--color--bg-deep);
	--ah-bg-surface: var(--wp--preset--color--bg-surface);
	--ah-bg-elevated: var(--wp--preset--color--bg-elevated);
	--ah-border: var(--wp--preset--color--border);
	--ah-border-glow: var(--wp--preset--color--border-glow);
	--ah-text-primary: var(--wp--preset--color--text-primary);
	--ah-text-secondary: var(--wp--preset--color--text-secondary);
	--ah-text-tertiary: var(--wp--preset--color--text-tertiary);
	--ah-amber: var(--wp--preset--color--amber);
	--ah-amber-glow: var(--wp--preset--color--amber-glow);
	--ah-teal: var(--wp--preset--color--teal);
}

/* ============== EESTI KAART ============== */
.andmehunt-eesti-kaart-wrap {
	position: relative;
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	background: var(--ah-bg-surface, #131A17);
	border: 1px solid var(--ah-border, rgba(232, 237, 233, 0.08));
	border-radius: 16px;
	padding: 1.5rem;
}
.andmehunt-eesti-kaart {
	display: block;
	width: 100%;
	height: auto;
}
.andmehunt-maakond {
	fill: rgba(74, 157, 140, 0.06);
	stroke: rgba(232, 237, 233, 0.25);
	stroke-width: 1;
	stroke-linejoin: round;
	cursor: pointer;
	transition: fill 0.18s ease, stroke 0.18s ease, transform 0.18s ease;
	transform-origin: center;
	transform-box: fill-box;
}
.andmehunt-maakond:hover,
.andmehunt-maakond:focus {
	fill: rgba(245, 166, 35, 0.85);
	stroke: #F5A623;
	stroke-width: 1.5;
	outline: none;
}
.andmehunt-maakond:focus-visible {
	stroke: #FFB84D;
	stroke-width: 2;
}

/* Maakonna tooltip - kuvatakse JS-iga */
.andmehunt-kaart-tooltip {
	position: absolute;
	background: var(--ah-bg-deep, #0A0F0D);
	color: var(--ah-text-primary, #E8EDE9);
	border: 1px solid #F5A623;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 500;
	pointer-events: none;
	white-space: nowrap;
	opacity: 0;
	transform: translate(-50%, -120%);
	transition: opacity 0.15s ease;
	z-index: 10;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.andmehunt-kaart-tooltip.is-visible {
	opacity: 1;
}
.andmehunt-kaart-tooltip::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 50%;
	transform: translateX(-50%) rotate(45deg);
	width: 8px;
	height: 8px;
	background: var(--ah-bg-deep, #0A0F0D);
	border-right: 1px solid #F5A623;
	border-bottom: 1px solid #F5A623;
}

/* Kaardi pealkiri ja kirjeldus */
.andmehunt-kaart-pealkiri {
	font-family: var(--wp--preset--font-family--geist, system-ui);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #F5A623;
	text-align: center;
	margin: 0 0 0.5rem;
}
.andmehunt-kaart-kirjeldus {
	font-size: 14px;
	color: var(--ah-text-secondary, #9AA8A0);
	text-align: center;
	margin: 0 0 1.5rem;
}

/* Mobile */
@media (max-width: 768px) {
	.andmehunt-eesti-kaart-wrap {
		padding: 1rem;
	}
	.andmehunt-kaart-tooltip {
		font-size: 12px;
		padding: 6px 10px;
	}
}

/* ============== LOGO ============== */
.andmehunt-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	transition: opacity 0.2s;
}
.andmehunt-logo:hover { opacity: 0.85; }
.andmehunt-logo img,
.andmehunt-logo picture {
	display: block;
	height: 44px;
	width: auto;
}
/* Footer logo veidi väiksem */
.andmehunt-footer .andmehunt-logo img,
.andmehunt-footer .andmehunt-logo picture {
	height: 40px;
}

/* ============== STICKY HEADER ============== */
.andmehunt-header {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(12px);
	background: rgba(10, 15, 13, 0.88) !important;
}

/* ============== HEADER NAVIGATSIOON ============== */
.andmehunt-primary-nav .wp-block-navigation-item__content {
	color: var(--ah-text-secondary);
	transition: color 0.2s;
}
.andmehunt-primary-nav .wp-block-navigation-item__content:hover { color: var(--ah-amber); }

/* ============== HERO STARRY TAUST ============== */
.andmehunt-stars-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		radial-gradient(2px 2px at 20% 30%, rgba(232, 237, 233, 0.15) 0%, transparent 50%),
		radial-gradient(1px 1px at 60% 70%, rgba(232, 237, 233, 0.2) 0%, transparent 50%),
		radial-gradient(1px 1px at 80% 20%, rgba(245, 166, 35, 0.3) 0%, transparent 50%),
		radial-gradient(2px 2px at 30% 80%, rgba(232, 237, 233, 0.1) 0%, transparent 50%),
		radial-gradient(1px 1px at 90% 60%, rgba(232, 237, 233, 0.15) 0%, transparent 50%);
}

/* ============== ANDMEHUNT BADGE ============== */
.andmehunt-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	background: rgba(245, 166, 35, 0.08);
	border: 1px solid rgba(245, 166, 35, 0.25);
	border-radius: 100px;
	font-size: 13px;
	color: var(--ah-amber);
	font-weight: 500;
}
.andmehunt-badge-pulse {
	width: 6px;
	height: 6px;
	background: var(--ah-amber);
	border-radius: 50%;
	animation: ah-pulse 2s infinite;
}
@keyframes ah-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.8); }
}

/* ============== HERO AKSENT (amber underline) ============== */
.andmehunt-accent {
	color: var(--ah-amber);
	position: relative;
	display: inline-block;
}
.andmehunt-accent::after {
	content: '';
	position: absolute;
	bottom: 4px;
	left: 0;
	right: 0;
	height: 0.4em;
	background: var(--ah-amber);
	opacity: 0.18;
	z-index: -1;
}

/* ============== STAT KAART ============== */
.andmehunt-stat .ah-num {
	font-family: var(--wp--preset--font-family--geist);
	font-size: 32px;
	font-weight: 700;
	color: var(--ah-amber);
	line-height: 1;
	display: block;
}
.andmehunt-stat .ah-lbl {
	font-size: 12px;
	color: var(--ah-text-tertiary);
	margin-top: 6px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	display: block;
}

/* ============== TOOTE KAART ============== */
.andmehunt-product-card {
	background: var(--ah-bg-surface);
	border: 1px solid var(--ah-border);
	border-radius: 12px;
	padding: 2rem;
	transition: transform 0.3s, border-color 0.3s;
	position: relative;
}
.andmehunt-product-card:hover {
	border-color: var(--ah-amber);
	transform: translateY(-4px);
}
.andmehunt-product-card.is-featured { border-color: var(--ah-amber); }
.andmehunt-featured-badge {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: var(--ah-amber);
	color: var(--ah-bg-deep);
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 100px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.andmehunt-price-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 1rem 0;
}
.andmehunt-price {
	font-family: var(--wp--preset--font-family--geist);
	font-size: 36px;
	font-weight: 700;
	color: var(--ah-text-primary);
	line-height: 1;
}
.andmehunt-price-compare {
	font-size: 14px;
	color: var(--ah-text-tertiary);
	text-decoration: line-through;
}
.andmehunt-save-tag {
	display: inline-block;
	background: rgba(74, 157, 140, 0.1);
	color: var(--wp--preset--color--teal-glow);
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 6px;
}

/* ============== EESTI KAART ============== */
.andmehunt-map {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--ah-bg-surface);
	border: 1px solid var(--ah-border);
	border-radius: 16px;
	padding: 2rem;
	overflow: hidden;
}
.andmehunt-map svg { width: 100%; height: 100%; }
.andmehunt-map-region {
	fill: rgba(74, 157, 140, 0.06);
	stroke: var(--ah-border);
	stroke-width: 1;
	transition: fill 0.2s, stroke 0.2s;
	cursor: pointer;
}
.andmehunt-map-region:hover {
	fill: rgba(245, 166, 35, 0.15);
	stroke: var(--ah-amber);
}
.andmehunt-map-pin {
	fill: var(--ah-amber);
	animation: ah-pulse 3s infinite ease-in-out;
}
.andmehunt-data-pulse {
	position: absolute;
	background: var(--ah-bg-elevated);
	border: 1px solid var(--ah-border-glow);
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 12px;
	color: var(--ah-text-secondary);
	z-index: 2;
}
.andmehunt-data-pulse .city { color: var(--ah-text-primary); font-weight: 600; }
.andmehunt-data-pulse .count { color: var(--ah-amber); font-weight: 600; }

/* ============== KKK ACCORDION ============== */
.wp-block-details {
	border: 1px solid var(--ah-border);
	border-radius: 8px;
	background: var(--ah-bg-surface);
	padding: 1rem 1.25rem;
	margin-bottom: 12px;
}
.wp-block-details[open] { border-color: var(--ah-border-glow); }
.wp-block-details summary { cursor: pointer; font-weight: 600; color: var(--ah-text-primary); }
.wp-block-details summary:hover { color: var(--ah-amber); }

/* ============== SCROLLBAR ============== */
* {
	scrollbar-width: thin;
	scrollbar-color: var(--ah-border) var(--ah-bg-deep);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--ah-bg-deep); }
*::-webkit-scrollbar-thumb { background: var(--ah-border); border-radius: 5px; }
*::-webkit-scrollbar-thumb:hover { background: var(--ah-border-glow); }

/* ============== SELECTION ============== */
::selection { background: var(--ah-amber); color: var(--ah-bg-deep); }

/* ============== FOOTER ============== */
.andmehunt-footer-links { list-style: none; padding: 0; }
.andmehunt-footer-links li { padding: 4px 0; }
.andmehunt-footer-links a { color: var(--ah-text-secondary); text-decoration: none; }
.andmehunt-footer-links a:hover { color: var(--ah-amber); }

/* ============== RESPONSIIVNE ============== */
@media (max-width: 600px) {
	.andmehunt-price { font-size: 28px; }
	.andmehunt-stat .ah-num { font-size: 24px; }
	.andmehunt-data-pulse { font-size: 11px; padding: 8px 10px; }
}
