/* Homepage hero search: suggestions under the box, quick links, and the navbar search that steps aside while this one is on screen. */

.kz-hero-search { position: relative; }
.kz-hero-suggest { position: absolute; left: 0; right: 0; top: calc(100% + .5rem); z-index: 30; overflow: hidden; border-radius: 1rem; color: hsl(var(--foreground)); background: hsl(var(--card)); box-shadow: 0 18px 44px -12px hsl(0 0% 0% / .5), 0 0 0 1px hsl(var(--border)); animation: kzSuggestIn .16s ease-out; }
.kz-hero-suggest[hidden] { display: none; }
@keyframes kzSuggestIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.kz-hero-suggest a { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .125rem .75rem; padding: .625rem .875rem; text-decoration: none; color: inherit; transition: background .12s; }
.kz-hero-suggest a:hover, .kz-hero-suggest a.is-on { background: hsl(var(--muted)); }
.kz-hero-suggest a + a { box-shadow: inset 0 1px 0 hsl(var(--border) / .7); }
.kz-sg-kind { grid-row: span 2; align-self: center; padding: .125rem .5rem; border-radius: 999px; font-size: .625rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--kz-action, var(--primary))); background: hsl(var(--kz-action, var(--primary)) / .12); }
.kz-sg-kind.is-announcement { color: hsl(35 80% 30%); background: hsl(var(--kz-warn) / .2); }
.kz-sg-kind.is-listing { color: hsl(215 60% 38%); background: hsl(215 70% 50% / .13); }
.kz-sg-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9375rem; font-weight: 700; }
.kz-sg-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.kz-hero-suggest .kz-sg-all { display: flex; justify-content: space-between; padding: .75rem .875rem; font-size: .875rem; font-weight: 700; color: hsl(var(--kz-action, var(--primary))); background: hsl(var(--muted) / .6); }
.kz-hero-suggest .kz-sg-all span:last-child { transition: transform .15s; }
.kz-hero-suggest .kz-sg-all:hover span:last-child { transform: translateX(3px); }
.kz-hero-empty { padding: 1rem .875rem; font-size: .875rem; color: hsl(var(--muted-foreground)); }

.kz-hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.kz-hero-chips[hidden] { display: none; }
.kz-hero-chips > span { font-size: .8125rem; color: hsl(0 0% 100% / .6); margin-right: .125rem; }
.kz-hero-chips a { padding: .3125rem .8125rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: #fff; text-decoration: none; background: hsl(0 0% 100% / .12); box-shadow: inset 0 0 0 1px hsl(0 0% 100% / .22); backdrop-filter: blur(4px); transition: background .15s, transform .15s; }
.kz-hero-chips a:hover { background: hsl(0 0% 100% / .24); transform: translateY(-1px); }
.kz-hero-chips a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* the navbar search is in the way while the hero one is in view: it steps aside, and is back once the hero scrolls off */
#nav-search-wrap { transition: opacity .25s ease, transform .25s ease, visibility 0s; }
#nav-search-wrap.kz-nav-search-hidden { opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none; transition: opacity .25s ease, transform .25s ease, visibility 0s .25s; }
@media (prefers-reduced-motion: reduce) { .kz-hero-suggest { animation: none; } #nav-search-wrap, #nav-search-wrap.kz-nav-search-hidden { transition: none; } }

/* The form's entrance animation makes it its own layer; lift it above the chips below it so the suggestions drop over them */
#hero-form { position: relative; z-index: 20; }
/* While suggestions are open the shortcuts step aside, so they don't peek out beside the list */
#hero-form:has(.kz-hero-suggest:not([hidden])) ~ .kz-hero-chips { opacity: 0; visibility: hidden; transition: opacity .12s; }
