/**
 * Hero Ask Bar — "Ask our concierge" CTA.
 * Accent: a per-site brand color set in the "Search Ask Tab" settings is
 * applied inline (style="--hrha-accent:…") and wins. With no setting, it
 * inherits the theme brand var (--brand-primary), then the concierge launcher
 * color (--hr-chat-accent), then a neutral. Tints derive from the accent via
 * color-mix so the whole component re-skins from one value.
 */
.hr-hero-ask {
	--hrha-accent: var(--brand-primary, var(--hr-chat-accent, #2C6E8F));
	--hrha-navy: #1C5982;
	--hrha-ink: #3a5266;
	--hrha-tint: color-mix(in srgb, var(--hrha-accent) 12%, transparent);
	--hrha-tint-strong: color-mix(in srgb, var(--hrha-accent) 22%, transparent);
	box-sizing: border-box;
	/* Width is set by JS to ~80% of the search bar; this is only a fallback. */
	width: 80%;
	margin: 0 auto 18px;
	background: #fff;
	border-radius: 0 0 18px 18px;
	overflow: hidden;
	box-shadow: 0 14px 40px rgba(28, 89, 130, .16), 0 3px 10px rgba(28, 89, 130, .07);
	font-family: inherit;
}
.hr-hero-ask * { box-sizing: border-box; }

.hr-hero-ask__header {
	display: flex; align-items: center; gap: 12px; width: 100%;
	background: none; border: 0; cursor: pointer; text-align: left; padding: 18px 22px;
}
.hr-hero-ask__icon {
	flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
	background: var(--hrha-tint); color: var(--hrha-accent);
	display: flex; align-items: center; justify-content: center;
}
.hr-hero-ask__icon svg { width: 20px; height: 20px; }
.hr-hero-ask__label { flex: 0 0 auto; font-size: 16px; font-weight: 700; color: var(--hrha-navy); letter-spacing: .01em; }
.hr-hero-ask__sub { flex: 1 1 auto; font-size: 14px; color: var(--hrha-ink); opacity: .8; }
.hr-hero-ask__chevron { flex: 0 0 auto; color: var(--hrha-accent); transition: transform .36s cubic-bezier(.4, 0, .2, 1); }
.hr-hero-ask__chevron svg { width: 22px; height: 22px; display: block; }
.hr-hero-ask[data-open] .hr-hero-ask__chevron { transform: rotate(180deg); }

/* Desktop accordion: smooth auto-height via grid-rows 0fr -> 1fr; content eases up. */
.hr-hero-ask__body { display: grid; grid-template-rows: 0fr;
	transition: grid-template-rows .36s cubic-bezier(.4, 0, .2, 1); }
.hr-hero-ask[data-open] .hr-hero-ask__body { grid-template-rows: 1fr; }
.hr-hero-ask__inner { overflow: hidden; min-height: 0; padding: 0 22px 20px;
	opacity: 0; transform: translateY(-6px); visibility: hidden;
	transition: opacity .22s ease, transform .32s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .36s; }
.hr-hero-ask[data-open] .hr-hero-ask__inner { opacity: 1; transform: none; visibility: visible;
	transition: opacity .3s ease .06s, transform .34s cubic-bezier(.34, 1.08, .5, 1) .04s, visibility 0s; }

.hr-hero-ask__field {
	display: flex; align-items: center; gap: 8px; background: #fff;
	border: 2px solid var(--hrha-accent); border-radius: 999px; padding: 6px 6px 6px 18px;
	box-shadow: 0 6px 18px var(--hrha-tint);
}
.hr-hero-ask__field:focus-within { box-shadow: 0 8px 26px var(--hrha-tint-strong); }
.hr-hero-ask__input {
	flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
	font-size: 16px; color: var(--hrha-navy); padding: 10px 0;
}
.hr-hero-ask__input::placeholder { color: #7E96A8; opacity: 1; }
.hr-hero-ask__mic {
	flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--hrha-tint); color: var(--hrha-accent);
	display: flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.hr-hero-ask__mic:hover { background: var(--hrha-tint-strong); }
.hr-hero-ask__mic.is-listening { background: var(--hrha-accent); color: #fff; animation: hrha-pulse 1.2s infinite; }
@keyframes hrha-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--hrha-tint-strong); } 50% { box-shadow: 0 0 0 8px transparent; } }
.hr-hero-ask__mic svg { width: 20px; height: 20px; }
.hr-hero-ask__submit {
	flex: 0 0 auto; height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--hrha-accent); color: #fff; font-size: 15px; font-weight: 700;
	display: flex; align-items: center; gap: 7px; transition: filter .15s ease, transform .1s ease;
}
.hr-hero-ask__submit:hover { filter: brightness(.94); }
.hr-hero-ask__submit:active { transform: translateY(1px); }
.hr-hero-ask__submit svg { width: 16px; height: 16px; }
.hr-hero-ask__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.hr-hero-ask__chip {
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
	background: #fff; border: 1px solid #D8E3EA; border-radius: 999px; padding: 9px 16px;
	font-size: 14px; font-weight: 600; color: var(--hrha-navy);
	transition: border-color .15s ease, background .15s ease;
}
.hr-hero-ask__chip:hover { border-color: var(--hrha-accent); background: color-mix(in srgb, var(--hrha-accent) 6%, #fff); }
.hr-hero-ask__chip svg { width: 17px; height: 17px; color: var(--hrha-accent); }

/* Modal-only chrome (mobile) — hidden on desktop. */
.hr-hero-ask__backdrop { display: none; }
.hr-hero-ask__modal-head { display: none; }
.hr-hero-ask__close {
	background: none; border: 0; cursor: pointer; font-size: 28px; line-height: 1;
	color: var(--hrha-navy); padding: 0 4px; margin-left: auto;
}

@media (max-width: 560px) {
	.hr-hero-ask__header { gap: 10px; padding: 15px 16px; }
	.hr-hero-ask__sub { display: none; }
	.hr-hero-ask__submit span { display: none; } .hr-hero-ask__submit { padding: 0 14px; }
}

/* Mobile: header opens a darkened, blurred modal. Backdrop fades, modal eases in with a subtle rise + scale. */
@media (max-width: 768px) {
	/* Body is a fixed modal here, not a grid accordion — neutralize the desktop grid + inner clip. */
	.hr-hero-ask__inner { overflow: visible; opacity: 1; transform: none; visibility: visible; transition: none; padding: 0; }

	.hr-hero-ask__backdrop {
		display: block; position: fixed; inset: 0; z-index: 99998;
		background: rgba(18, 42, 61, .55); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
		opacity: 0; visibility: hidden; pointer-events: none;
		transition: opacity .3s ease, visibility 0s linear .3s;
	}
	.hr-hero-ask[data-open] .hr-hero-ask__backdrop {
		opacity: 1; visibility: visible; pointer-events: auto;
		transition: opacity .3s ease;
	}

	.hr-hero-ask__body {
		display: block; position: fixed; z-index: 99999; left: 50%; top: 50%;
		width: min(460px, 92vw); max-height: 88vh; overflow: auto;
		background: #fff; border-radius: 18px; padding: 16px 18px 20px;
		box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
		opacity: 0; visibility: hidden; pointer-events: none;
		transform: translate(-50%, -46%) scale(.96);
		transition: opacity .26s ease, transform .34s cubic-bezier(.34, 1.12, .46, 1), visibility 0s linear .34s;
	}
	.hr-hero-ask[data-open] .hr-hero-ask__body {
		opacity: 1; visibility: visible; pointer-events: auto;
		transform: translate(-50%, -50%) scale(1);
		transition: opacity .26s ease, transform .36s cubic-bezier(.34, 1.12, .46, 1);
	}
	.hr-hero-ask__modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.hr-hero-ask__body, .hr-hero-ask__inner, .hr-hero-ask__backdrop, .hr-hero-ask__chevron { transition-duration: .01ms !important; }
}
