/* Phones: the search is one compact bar while browsing and a fullscreen panel when tapped
   (mobile-search.js). Nothing here applies above 740px. */
.search-compact,.search-close,.header-search{display:none}
@media(max-width:740px){
 #search:not(.is-open){padding:0;background:none;border:0;box-shadow:none;margin:0}
 #search:not(.is-open)>:not(.search-compact){display:none!important}
 .search-compact{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:8px 14px;border:1px solid #c7acea55;border-radius:14px;background:#1c1f25;color:var(--muted);font-size:15px;text-align:left;box-shadow:0 0 18px #c7acea1f}
 .search-compact .sparkle{font-size:21px;line-height:1}
 .search-compact-hint,.search-compact-query{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .search-compact-query{color:var(--ink)}
 .search-compact svg{flex:none;color:var(--accent)}
 /* Open: the search is the page — everything else is hidden, the panel stays in the flow (no
    fixed layer for iOS Safari's keyboard to push the page out from under). */
 body.search-open>:not(main):not(dialog):not(.app-toast),body.search-open main>:not(.discovery-top),body.search-open .discovery-top>:not(#search){display:none!important}
 body.search-open main.wrap{padding:0 18px}
 body.search-open .discovery-top{margin:0}
 #search.is-open{position:relative;min-height:100vh;min-height:100svh;margin:0;border:0;border-radius:0;background:none;box-shadow:none;padding:60px 0 calc(24px + env(safe-area-inset-bottom))}
 #search.is-open>.search-compact{display:none}
 /* Safari squeezes an SVG with no CSS size to nothing inside a flex button (seen in the iOS 18
    simulator: the close button showed a dot). */
 .search-close svg,.header-search svg,.search-compact svg{flex:none;width:18px;height:18px}
 .search-compact svg,.header-search svg{width:20px;height:20px}
 .search-close{display:flex;align-items:center;justify-content:center;position:absolute;top:12px;right:0;width:40px;height:40px;border-radius:50%;border:1px solid #ffffff2e;background:#1c1f25;color:var(--ink)}
 /* The header is full on a phone (logo, language, 18+): the icon's room comes from a smaller logo
    and no globe while it shows. .header-status is display:contents here, so order places it. */
 body.search-bar-away:not(.search-open) .header-search{display:flex;align-items:center;justify-content:center;order:3;width:34px;height:34px;flex:none;border-radius:50%;border:1px solid #444851;background:#1c1f25;color:var(--accent)}
 body.search-bar-away:not(.search-open) .language-switch>svg{display:none}
 body.search-bar-away:not(.search-open):not(.detail-page) .brand{flex:0 0 auto;width:auto}
 body.search-bar-away:not(.search-open):not(.detail-page) .brand img.nightplay-logo{width:116px;height:39px}
}
@media(max-width:360px){body.search-bar-away:not(.search-open):not(.detail-page) .brand img.nightplay-logo{width:100px;height:33px}}
