/* Filtre receptov v zoznamoch – vzhľad C „Kompaktná lišta“ (majiteľ 15. 11. 2026, docs/generator.md → Filtre receptov). Iba stránky zoznamov
   s filtrami (fl_hlava() v generuj-web.py). Načíta sa v <head> pred styl.css, preto majú pravidlá „main“ (vyššia špecifickosť). */
main .fl { padding-top: 34px; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); column-gap: 22px; align-items: center; }
main .fl > :not(.fl-hladaj):not(.fl-lista) { grid-column: 1 / -1; }

/* hľadanie v zozname, počet receptov a zoradenie */
main .fl-hladaj { position: relative; margin: 0 0 16px; }
main .fl-hladaj svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); pointer-events: none; }
main .fl-hladaj input { width: 100%; min-height: 46px; padding: 10px 16px 10px 44px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  font: inherit; font-size: 1rem; color: var(--ink); -webkit-appearance: none; appearance: none; }
main .fl-hladaj input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .14); }
main .fl-hladaj input::placeholder { color: var(--muted); }
main .fl-lista { display: flex; align-items: center; gap: 12px 18px; margin: 0 0 16px; min-width: 0; }
main .fl-stav { margin: 0 auto 0 0; color: var(--muted); font-size: .98rem; }
main .fl-stav b { color: var(--heading); font-size: 1.06rem; font-variant-numeric: tabular-nums; }
main .fl-stav[aria-busy] { opacity: .6; }
main .fl-stav-m { display: none; }
main .fl-zor { display: flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--muted); }
main .fl-zor select { min-height: 42px; padding: 8px 38px 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; font: inherit; font-size: .95rem; font-weight: 600;
  color: var(--ui); cursor: pointer; -webkit-appearance: none; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f1f1f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; }
main .fl-otvor { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 1px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ui);
  font: inherit; font-size: .98rem; font-weight: 700; cursor: pointer; }
main .fl-otvor svg { width: 19px; height: 19px; flex: none; }
main .fl-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #fff; font-size: .78rem; line-height: 22px; text-align: center; }

/* rad tlačidiel skupín s ponukou */
main .fl-panel { margin: 0 0 18px; min-width: 0; }
main .fl-hlava, main .fl-pata { display: none; }
main .fl-skupiny { display: flex; flex-wrap: wrap; gap: 8px; }
main .fl-sk { position: relative; }
main .fl-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 7px 11px 7px 15px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  color: var(--ui); font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
main .fl-pill svg { width: 16px; height: 16px; flex: none; transition: transform .15s; }
main .fl-pill:hover, main .fl-sk.otvorena .fl-pill { border-color: var(--ink); }
main .fl-sk.otvorena .fl-pill svg { transform: rotate(180deg); }
main .fl-sk.ma-vyber .fl-pill { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
main .fl-pill:disabled, main .fl-pill:disabled:hover { border-color: var(--line); color: var(--muted); opacity: .6; cursor: default; }
main .fl-pill-v:empty { display: none; }
main .fl-pill-v { max-width: 150px; overflow: hidden; text-overflow: ellipsis; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .8rem; }
main .fl-moz { display: none; position: absolute; z-index: 6; left: 0; top: calc(100% + 8px); width: max-content; min-width: 250px; max-width: min(460px, calc(100vw - 32px));
  flex-wrap: wrap; gap: 8px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-3); }
main .fl-sk.otvorena .fl-moz { display: flex; }
main .fl-sk.vpravo .fl-moz { left: auto; right: 0; }
main .fl-nazov { flex: 1 1 100%; margin: 0 0 2px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
main .fl-ch { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  color: var(--ui); font: inherit; font-size: .93rem; line-height: 1.25; cursor: pointer; text-align: left; transition: border-color .15s, background .15s, color .15s; }
main .fl-ch small { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
main .fl-ch:hover { border-color: var(--accent); color: var(--accent); }
main .fl-ch[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
main .fl-ch[aria-pressed=true] small { color: rgba(255, 255, 255, .85); }

/* výsledky: vybrané filtre, ďalšie recepty, prázdny výsledok */
main .fl-vysl { min-width: 0; }
main .fl-vybrane { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; }
main .fl-stitok { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px 4px 13px; border: 0; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-2); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
main .fl-stitok svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
main .fl-stitok:hover { background: var(--accent-soft-2); }
main .fl-vymaz-vsetky, main .fl-vymaz { border: 0; background: none; padding: 6px 4px; color: var(--ui); font: inherit; font-size: .92rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
main .fl-viac { display: flex; justify-content: center; margin: 34px 0 0; }
main .fl-viac small { font-weight: 400; color: var(--muted); }
main .fl-prazdne { padding: 34px 24px; border: 1px dashed var(--line-2); border-radius: var(--r); text-align: center; color: var(--text-2); }
main .fl-prazdne p { margin: 0 0 6px; }
main .fl-prazdne .btn { margin-top: 10px; }
main .fl-aktivne .zz-lista { display: none; }

@media (max-width: 1100px) {
  main .fl { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 760px) {
  main .fl { display: block; padding-top: 22px; }
  main .fl-hladaj { margin: 0 0 4px; }
  /* Filtre a Zoradiť vedľa seba, pri posúvaní ostávajú hore; počet je nad kartami */
  main .fl-lista { position: sticky; top: 0; z-index: 4; margin: 0 -18px 10px; padding: 10px 18px; gap: 10px; background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line); }
  /* 50 % (nie 0): pri základe 0 by tlačidlo s väčším vnútorným okrajom vyšlo širšie ako zoradenie */
  main .fl-otvor { display: inline-flex; flex: 1 1 50%; justify-content: center; min-width: 0; }
  main .fl-otvor span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main .fl-lista .fl-stav { display: none; }
  main .fl-zor { flex: 1 1 50%; min-width: 0; }
  main .fl-zor label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  main .fl-zor select { width: 100%; min-height: 44px; border-color: var(--ink); text-overflow: ellipsis; }
  main .fl-stav-m { display: block; margin: 4px 0 12px; font-size: .95rem; }
  /* panel so všetkými skupinami cez celú obrazovku */
  main .fl-panel { display: none; position: fixed; inset: 0; z-index: 60; margin: 0; flex-direction: column; background: #fff; }
  main .fl.fl-otvoreny .fl-panel { display: flex; }
  main .fl-hlava { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 10px 20px; border-bottom: 1px solid var(--line); }
  main .fl-titul { margin: 0; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--heading); }
  main .fl-zavri { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ui); cursor: pointer; }
  main .fl-zavri svg { width: 24px; height: 24px; }
  main .fl-skupiny { display: block; flex: 1; overflow: auto; overscroll-behavior: contain; padding: 0 20px 20px; -webkit-overflow-scrolling: touch; }
  main .fl-sk { padding: 16px 0 14px; border-top: 1px solid var(--line); }
  main .fl-sk:first-child { border-top: 0; }
  main .fl-sk.fl-prazdna { display: none; }
  main .fl-pill { display: none; }
  main .fl-moz, main .fl-sk.otvorena .fl-moz { display: flex; position: static; width: auto; min-width: 0; max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  main .fl-nazov { margin: 0 0 4px; color: var(--heading); font-size: .8rem; }
  main .fl-ch { min-height: 40px; font-size: .95rem; }
  main .fl-pata { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -8px 20px -16px rgba(27, 31, 39, .35); }
  main .fl-pata .fl-vymaz { flex: none; white-space: nowrap; }
  main .fl-ukaz { flex: 1; max-width: 280px; padding-left: 16px; padding-right: 16px; line-height: 1.25; text-align: center; }
  html.fl-zamknute, html.fl-zamknute body { overflow: hidden; }
}
@media (max-width: 380px) {
  main .fl-otvor, main .fl-zor select { padding-left: 12px; font-size: .92rem; }
}
