/* Společný základ pro nové návrhy n1.html, n2.html, n3.html.
   Jen kostra a mechanika (mřížka, menu, formulář, stavy). Vzhled určuje n1.css, n2.css, n3.css
   přes proměnné: --pozadi, --plocha, --text, --tlumeny, --linka, --akcent, --na-akcentu, --fokus,
   --pismo, --nadpis, --radius. */
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --sirka: 1240px;
  --okraj: 32px;
  --sekce: var(--s10);
  --t-maly: 0.875rem;
  --t-text: 1.0625rem;
  --t-vetsi: 1.3125rem;
  --t-h3: 1.625rem;
  --t-h2: clamp(2.125rem, 1.4rem + 2.6vw, 3.5rem);
  --t-h1: clamp(2.75rem, 1.3rem + 5.6vw, 5.75rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--pismo);
  font-size: var(--t-text);
  line-height: 1.6;
  color: var(--text);
  background: var(--pozadi);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--nadpis); line-height: 1.06; text-wrap: balance; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; }
p { text-wrap: pretty; max-width: 65ch; }

.obal { width: min(100% - 2 * var(--okraj), var(--sirka)); margin-inline: auto; }
.sekce { padding-block: var(--sekce); }
[class$="-in"] > *, .tabule-pod > *, .tabule-stala > * { min-width: 0; }
.ik { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Tlačítka ---------- */
.tl {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 52px; padding: var(--s3) var(--s5);
  border: 2px solid var(--akcent); border-radius: var(--radius-tl, 999px);
  background: var(--akcent); color: var(--na-akcentu);
  font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.tl:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px var(--akcent); }
.tl:active { transform: translateY(0); box-shadow: none; }
.tl-druhe { background: transparent; color: var(--text); border-color: var(--text); }
.tl-druhe:hover { background: var(--text); color: var(--pozadi); box-shadow: none; }
.tl-maly { min-height: 44px; padding: var(--s2) var(--s4); font-size: var(--t-maly); }

/* ---------- Hlavička ---------- */
.hlavicka { position: sticky; top: 0; z-index: 20; background: var(--hlavicka, var(--pozadi)); }
.hlavicka-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); min-height: 80px; }
.znacka { display: block; flex: none; }
.znacka img { width: 64px; height: 64px; mix-blend-mode: multiply; }
.navigace { display: flex; align-items: center; gap: var(--s6); }
.navigace a:not(.tl) { text-decoration: none; font-weight: 500; padding-block: var(--s3); position: relative; }
.navigace a:not(.tl)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px;
  background: var(--akcent); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.navigace a:not(.tl):hover::after { transform: scaleX(1); }
.menu-tlacitko {
  display: none; width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.menu-tlacitko span { width: 26px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-otevrene .menu-tlacitko span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-otevrene .menu-tlacitko span:nth-child(2) { opacity: 0; }
.menu-otevrene .menu-tlacitko span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Stav otevřeno ---------- */
.stav { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; font-size: var(--t-maly); }
.stav::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.stav.je-otevreno::before { background: var(--otevreno, #2E8B57); box-shadow: 0 0 0 0 var(--otevreno, #2E8B57); animation: tep 2.2s ease-out infinite; }
.stav.je-zavreno::before { background: var(--zavreno, #C8862A); }
@keyframes tep { 0% { box-shadow: 0 0 0 0 rgb(46 139 87 / .55); } 100% { box-shadow: 0 0 0 12px rgb(46 139 87 / 0); } }

/* ---------- Otevírací doba ---------- */
.doba li { display: flex; justify-content: space-between; gap: var(--s5); padding-block: var(--s3); border-bottom: 1px solid var(--linka); }
.doba li:last-child { border-bottom: 0; }
.doba li span:last-child { white-space: nowrap; }
.doba .dnes { font-weight: 700; }

/* ---------- Týdenní menu (kreslí skript.js) ---------- */
.zalozky { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.zalozka {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; padding: var(--s2) var(--s4);
  border: 2px solid var(--linka); border-radius: var(--radius-tl, 999px); background: transparent; cursor: pointer; font-weight: 600;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.zalozka:hover { border-color: var(--akcent); }
.zalozka[aria-selected="true"] { background: var(--akcent); border-color: var(--akcent); color: var(--na-akcentu); }
.jidlo { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s5); padding-block: var(--s4); border-bottom: 1px solid var(--linka); }
.jidlo:last-child { border-bottom: 0; }
.jidlo-nazev { display: block; font-weight: 600; }
.jidlo-popis { display: block; font-size: var(--t-maly); color: var(--tlumeny); line-height: 1.5; }
.jidlo-cena { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Ceník kávy (kreslí obsah-data.js) ---------- */
.kava-seznam li { display: flex; align-items: baseline; gap: var(--s2); padding-block: var(--s2); }
.kava-seznam li span:first-child { flex: none; }
.kava-seznam li::after { content: ""; order: 1; flex: 1; border-bottom: 2px dotted var(--linka); transform: translateY(-4px); }
.kava-seznam li span:last-child { order: 2; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Recenze (kreslí obsah-data.js) ---------- */
.recenze blockquote { font-size: var(--t-text); line-height: 1.55; }
.recenze figcaption { margin-top: var(--s4); font-weight: 700; display: flex; align-items: center; gap: var(--s2); }
.recenze .hvezdy { display: flex; gap: 2px; color: var(--hvezda, #E0A030); }
.recenze .hvezdy .ik { width: 16px; height: 16px; }

/* ---------- Zástupný blok místo fotky ---------- */
.zastup {
  display: grid; place-items: center; text-align: center; padding: var(--s5);
  border: 2px dashed var(--linka); border-radius: var(--radius); background: var(--zastup, transparent);
  color: var(--tlumeny); font-size: var(--t-maly); font-weight: 600; min-height: 160px;
}

/* ---------- Formulář ---------- */
.volby { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.volba {
  display: flex; align-items: center; gap: var(--s4); text-align: left; min-height: 88px; padding: var(--s4) var(--s5);
  border: 2px solid var(--linka); border-radius: var(--radius); background: var(--plocha); cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.volba:hover { border-color: var(--akcent); transform: translateY(-2px); }
.volba[aria-pressed="true"] { border-color: var(--akcent); background: var(--volba-vybrana, var(--plocha)); box-shadow: inset 0 0 0 1px var(--akcent); }
.volba .ik { width: 36px; height: 36px; color: var(--akcent); }
.volba strong { display: block; font-size: var(--t-vetsi); line-height: 1.2; }
.volba small { display: block; color: var(--tlumeny); font-size: var(--t-maly); }
.rezervace-pole { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s5); margin-top: var(--s5); }
.pole { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.pole.siroke, .rezervace-pole > .tl, .rezervace-pole > .pozn { grid-column: 1 / -1; }
.rezervace-pole > .tl { justify-self: start; }
.pole label { font-weight: 600; font-size: var(--t-maly); }
.pole input, .pole textarea {
  width: 100%; min-height: 52px; padding: var(--s3) var(--s4);
  border: 2px solid var(--linka); border-radius: var(--radius-pole, 12px); background: var(--pole, #fff);
  transition: border-color .2s ease;
}
/* iPhone dává poli s datem a časem vlastní šířku a pole pak vyjede z formuláře */
.pole input { min-width: 0; max-width: 100%; }
.pole input[type="date"], .pole input[type="time"] { -webkit-appearance: none; appearance: none; }
.pole input::-webkit-date-and-time-value { text-align: left; }
.pole textarea { min-height: 120px; resize: vertical; }
.pole input:hover, .pole textarea:hover { border-color: var(--tlumeny); }
.pole input:focus-visible, .pole textarea:focus-visible { border-color: var(--akcent); outline-offset: 1px; }
.pole.ma-chybu input, .pole.ma-chybu textarea { border-color: #B3261E; }
.pole-chyba { color: #B3261E; font-size: var(--t-maly); font-weight: 600; }
.rezervace-hlaska { margin-top: var(--s5); padding: var(--s5); border-radius: var(--radius); background: var(--akcent); color: var(--na-akcentu); font-weight: 600; }

/* ---------- Odhalení při scrollu ---------- */
.odhal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.odhal.videt { opacity: 1; transform: none; }
.odhal.zp1 { transition-delay: .1s; } .odhal.zp2 { transition-delay: .2s; } .odhal.zp3 { transition-delay: .3s; }

/* ---------- Menší šířky ---------- */
@media (max-width: 900px) {
  :root { --okraj: 20px; --sekce: var(--s9); }
  .menu-tlacitko { display: flex; }
  .navigace {
    position: fixed; inset: 80px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s4) var(--okraj) var(--s6); background: var(--hlavicka, var(--pozadi));
    border-bottom: 1px solid var(--linka); box-shadow: 0 24px 40px -24px rgb(0 0 0 / .25);
    visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
  }
  .menu-otevrene .navigace { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .navigace a:not(.tl) { padding-block: var(--s4); border-bottom: 1px solid var(--linka); font-size: var(--t-vetsi); }
  .navigace a:not(.tl)::after { display: none; }
  .navigace .tl { margin-top: var(--s5); }
}
@media (max-width: 600px) {
  :root { --sekce: var(--s8); }
  .volby, .rezervace-pole { grid-template-columns: 1fr; }
  .rezervace-pole > .tl { justify-self: stretch; }
  .jidlo { gap: var(--s4); }
}
