/* Címlapok: the search box in the top bar and its results dropdown (homepage). */
/* Search: the most prominent control, centred in the top bar on wider screens. */
.searchbox{position:relative; flex:1 1 320px; max-width:560px; margin:0 auto; min-width:0}
.searchbox svg{position:absolute; left:14px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:var(--muted); pointer-events:none}
.search{
  width:100%; height:38px; padding:0 14px 0 40px; font-size:16px;   /* 38px: the same as the Frissítés button; 16px text so phones do not zoom in */
  background:var(--surface); border:1.5px solid var(--line); border-radius:8px;   /* same as the buttons */
  box-shadow:0 1px 4px rgba(0,0,0,.05);
}
.search::placeholder{color:var(--muted)}
.search:focus{border-color:var(--accent); outline:none; box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent)}
/* Search results: a dropdown under the search bar. */
.search-pop{
  position:absolute; z-index:20; top:calc(100% + 6px); left:0; width:100%; min-width:min(480px, calc(100vw - 32px));
  max-height:min(70vh, 640px); overflow:auto; overscroll-behavior:contain;
  background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:0 12px 32px rgba(0,0,0,.18);
}
.search-pop[hidden]{display:none}
.sr-head{position:sticky; top:0; z-index:1; padding:8px 12px; font:400 11px var(--mono); color:var(--muted); background:var(--surface); border-bottom:1px solid var(--line)}
.sr{display:flex; gap:12px; align-items:flex-start; padding:10px 12px; text-decoration:none; color:var(--ink); border-bottom:1px solid var(--line)}
.sr:last-child{border-bottom:0}
.sr.active,.sr:hover{background:var(--fresh)}
.sr-img{width:72px; aspect-ratio:4/3; object-fit:cover; border-radius:6px; flex:none; background:var(--line)}
.sr-txt{flex:1; min-width:0}
.sr-t{display:block; font:500 15px/1.3 var(--serif); text-wrap:pretty}
.sr-t mark{background:color-mix(in srgb, var(--accent) 22%, transparent); color:inherit; border-radius:2px; padding:0 1px}
.sr-w{display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin-top:4px; font:400 11px var(--mono); color:var(--muted)}
.sr-w b{font-weight:500; color:var(--accent)}
@media (max-width:560px){
  /* Phones: the search box gets its own full-width line under the title and the theme switch. */
  .searchbox{order:3; flex:1 1 200px}
  /* Phones: the dropdown spans the page width under the search row. */
  .search-pop{width:calc(100vw - var(--gutter-l) - var(--gutter-r)); min-width:0}
  .sr-img{width:60px}
}
