/* styl.css – společný vzhled rezervačního systému ZŠ Církvice (D13).
   Barvy podle webu školy: tmavě modrá #04194e, žlutá #FFCA58. Navrženo nejdřív pro mobil. */

/* Písmo Nunito (SIL Open Font License, viz OFL-Nunito.txt) – uložené na našem serveru, nic se nestahuje od Googlu */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url("nunito-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
    src: url("nunito-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    --modra: #04194e;
    --modra-svetla: #e8edf8;
    --zluta: #ffca58;
    --zluta-svetla: #fff4d9;
    --akce: #0b5cad;
    --akce-tmava: #084a8c;
    --zelena: #1a7f4b;
    --zelena-svetla: #e6f4ec;
    --cervena: #b42318;
    --cervena-svetla: #fdecea;
    --oranzova: #9a4b00;
    --seda: #5f6672;
    --seda-svetla: #f1f2f4;
    --okraj: #d5d9e0;
    --pozadi: #f6f7f9;
    --text: #1d2330;
    --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--pozadi);
}
a { color: var(--akce); }
h1, h2, h3 { line-height: 1.25; color: var(--modra); }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .5rem; }
small, .mensi { font-size: .875rem; color: var(--seda); }

/* --- Hlavička a patička ------------------------------------------------- */
.hlavicka {
    background: var(--modra);
    color: #fff;
    border-bottom: 4px solid var(--zluta);
}
.hlavicka-obsah {
    max-width: 960px; margin: 0 auto; padding: 10px 16px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.hlavicka a { color: #fff; text-decoration: none; }
.hlavicka .logo {
    width: 48px; height: 48px; border-radius: 50%; background: #fff; padding: 3px; flex: none;
}
.hlavicka .nazev { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.hlavicka .podnazev { font-size: .85rem; opacity: .85; }
.hlavicka .vpravo { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.obsah { max-width: 960px; margin: 0 auto; padding: 20px 16px 40px; }
.obsah.uzky { max-width: 560px; }

.paticka { text-align: center; color: var(--seda); font-size: .85rem; padding: 24px 16px 32px; }

/* --- Karty, zprávy ------------------------------------------------------ */
.karta {
    background: #fff; border: 1px solid var(--okraj); border-radius: var(--radius);
    padding: 18px; margin-bottom: 18px;
}
.karta > :first-child { margin-top: 0; }
.uvod { font-size: 1.05rem; line-height: 1.65; border-left: 5px solid var(--zluta); }
.uvod p { margin: 0 0 .55em; }
.uvod p:last-child { margin-bottom: 0; }
.uvod ul { margin: .2em 0 .7em; padding-left: 1.3em; }
.uvod li { margin: .2em 0; }
.uvod strong { color: var(--modra); }

.zprava { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 18px; border: 1px solid; font-weight: 500; }
.zprava-ok    { background: var(--zelena-svetla); border-color: #9fd3b5; color: #11583a; }
.zprava-chyba { background: var(--cervena-svetla); border-color: #f1a9a2; color: #8a1c12; }
.zprava-info  { background: var(--modra-svetla); border-color: #b9c6e6; color: var(--modra); }
.zprava-pozor { background: var(--zluta-svetla); border-color: #f1d08a; color: #6b4a00; }

/* --- Formuláře a tlačítka ---------------------------------------------- */
label { display: block; font-weight: 600; margin: 12px 0 4px; }
label .mensi { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=search], select, textarea {
    width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #aeb5c1; border-radius: 8px; background: #fff;
}
input:focus, textarea:focus, select:focus, button:focus-visible, summary:focus-visible, a:focus-visible {
    outline: 3px solid var(--zluta); outline-offset: 1px;
}
textarea { min-height: 90px; resize: vertical; }

.tlacitko, button {
    display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
    padding: 10px 18px; border-radius: 8px; border: 1px solid var(--akce);
    background: var(--akce); color: #fff; text-decoration: none; text-align: center;
}
.tlacitko:hover, button:hover { background: var(--akce-tmava); }
.tlacitko.vedlejsi, button.vedlejsi { background: #fff; color: var(--akce); }
.tlacitko.vedlejsi:hover, button.vedlejsi:hover { background: var(--modra-svetla); }
.tlacitko.nebezpecne, button.nebezpecne { background: var(--cervena); border-color: var(--cervena); }
.tlacitko.nebezpecne:hover, button.nebezpecne:hover { background: #8a1c12; }
.tlacitko.male, button.male { padding: 6px 12px; font-size: .9rem; }
.tlacitko.siroke, button.siroke { width: 100%; }
.hlavicka button { background: transparent; border-color: rgba(255,255,255,.6); padding: 6px 12px; }
.hlavicka button:hover { background: rgba(255,255,255,.15); }

.radek { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.akce { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.skryte { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* --- Výběr učitele ------------------------------------------------------ */
.seznam-ucitelu { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); padding: 0; margin: 0; list-style: none; }
.seznam-ucitelu a {
    display: block; padding: 16px 18px; background: #fff; border: 1px solid var(--okraj);
    border-left: 6px solid var(--akce); border-radius: var(--radius);
    font-weight: 600; font-size: 1.1rem; text-decoration: none; color: var(--modra);
}
.seznam-ucitelu a:hover { background: var(--modra-svetla); }
.karta-zapis { display: block; padding: 18px; border-radius: var(--radius); background: var(--zluta); color: var(--modra); text-decoration: none; font-weight: 700; font-size: 1.15rem; border: 1px solid #e0a92e; }
.karta-zapis:hover { background: #ffd57a; }
.karta-zapis span { display: block; font-weight: 400; font-size: .95rem; }

/* --- Rozpis termínů ----------------------------------------------------- */
.legenda { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .9rem; color: var(--seda); margin: 0 0 8px; padding: 0; list-style: none; }
.legenda li::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 2px solid; }
.legenda .l-volno::before { border-color: var(--zelena); background: #d6f0df; }
.legenda .l-ceka::before { border-color: #c98a00; background: #ffe9a8; }
.legenda .l-obsazeno::before { border-color: #c9473b; background: #f9d9d5; }
.legenda .l-moje::before { border-color: var(--modra); background: #d3ddf3; }
.legenda .l-prestavka::before { border-color: #8d95a1; background: repeating-linear-gradient(135deg, #e3e6ea 0 3px, #cfd4db 3px 6px); }

.den { margin: 22px 0 10px; font-size: 1.1rem; text-transform: none; }
.den::first-letter { text-transform: uppercase; }
.sloty { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-items: start; }
.slot {
    border: 2px solid var(--okraj); border-radius: var(--radius); background: #fff;
    padding: 10px 12px; min-height: 64px;
}
.slot .cas { font-size: 1.2rem; font-weight: 700; display: block; }
.slot .stav { font-size: .85rem; color: var(--seda); }
/* Stav termínu je poznat podle výplně i rámečku (výraznější barvy, 10. 11. 2026) */
.slot-volno { border-color: var(--zelena); background: #e3f5ea; }
.slot-volno .stav { color: #11583a; font-weight: 700; }
.slot-volno:hover { background: #d3eedd; }
.slot-ceka { border-color: #c98a00; background: #fff0c2; }
.slot-ceka .stav { color: #6b4a00; font-weight: 600; }
.slot-obsazeno { border-color: #c9473b; background: #fbe1de; }
.slot-obsazeno .stav { color: #8a1c12; font-weight: 600; }
.slot-prestavka { border-color: #8d95a1; background: repeating-linear-gradient(135deg, #eceef1 0 8px, #dde1e6 8px 16px); }
.slot-prestavka .stav { color: #4b525c; font-weight: 600; }
.slot-probehlo { background: var(--seda-svetla); opacity: .55; }
.slot-moje { border-color: var(--modra); border-width: 3px; background: #dbe4f6; }
.slot-moje .stav { color: var(--modra); font-weight: 700; }

/* rozbalení formuláře u termínu bez JavaScriptu */
.slot details { margin-top: 4px; }
.slot summary { cursor: pointer; list-style: none; color: var(--akce); font-weight: 600; font-size: .9rem; }
.slot summary::-webkit-details-marker { display: none; }
.slot summary::after { content: " ▾"; }
.slot details[open] { grid-column: 1 / -1; }
.slot-volno:has(details[open]) { grid-column: 1 / -1; }
.slot form { margin-top: 6px; }
.slot form label { font-size: .9rem; margin-top: 8px; }
.slot form button { margin-top: 12px; width: 100%; }

.moje-terminy { list-style: none; padding: 0; margin: 0; }
.moje-terminy li { padding: 6px 0; border-top: 1px solid var(--okraj); }
.moje-terminy li:first-child { border-top: 0; }

/* --- Tabulky (admin) ---------------------------------------------------- */
.tabulka-obal { overflow-x: auto; }
table.tabulka { width: 100%; border-collapse: collapse; background: #fff; }
table.tabulka th, table.tabulka td { text-align: left; padding: 10px; border-bottom: 1px solid var(--okraj); vertical-align: top; }
table.tabulka th { background: var(--seda-svetla); font-size: .9rem; }
.stitek { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.stitek-ok { background: var(--zelena-svetla); color: #11583a; }
.stitek-ceka { background: var(--zluta-svetla); color: #6b4a00; }
.stitek-seda { background: var(--seda-svetla); color: var(--seda); }

.admin-slot .rodic { font-size: .9rem; margin: 4px 0 8px; word-break: break-word; }
.admin-slot form { margin: 0; }
.admin-slot button { width: 100%; }

/* --- Tisk --------------------------------------------------------------- */
.jen-tisk { display: none; }
@media print {
    body { background: #fff; font-size: 12pt; }
    .hlavicka, .paticka, .netisknout, button, .tlacitko, details > form { display: none !important; }
    .jen-tisk { display: block; }
    .obsah { max-width: none; padding: 0; }
    .karta { border: 0; padding: 0; }
    .sloty { grid-template-columns: repeat(4, 1fr); }
    .slot { break-inside: avoid; }
    a { color: inherit; text-decoration: none; }
}

/* --- Tabulky na mobilu jako karty (správa učitelů, dotazníky) ------------- */
@media (max-width: 700px) {
    table.tabulka-karty, .tabulka-karty tbody, .tabulka-karty tr, .tabulka-karty td { display: block; width: 100%; }
    .tabulka-karty tr:first-child { display: none; }
    .tabulka-karty tr { border-bottom: 2px solid var(--okraj); padding: 10px 0; }
    .tabulka-karty td { border: 0; padding: 3px 0; }
    .tabulka-karty td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--seda); font-size: .85rem; }
}


/* --- Dotazník k zápisu ve vzhledu původního tiskopisu ------------------------- */
.tiskopis { font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.5; color: #000;
    background: #eefaee; border: 2px solid #1d2330; padding: 18px 20px; max-width: 24cm; margin: 0 auto 16px; }
.tp-nadpis { font-size: 1.6rem; font-weight: bold; text-align: center; text-shadow: 1px 1px #aaa; margin-bottom: 14px; line-height: 1.2; }
.tp-radek { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; margin: 7px 0; }
.tiskopis label { margin: 0; font-weight: normal; }
.tp-pole { display: inline-flex; align-items: baseline; gap: 6px; flex: 0 1 auto; max-width: 100%; }
.tiskopis .tp-pole input[type=text] { width: calc(var(--s) * 0.62em + 14px); max-width: 100%; border: 0; border-bottom: 1.5px solid #333;
    border-radius: 0; background: rgba(255,255,255,.75); padding: 2px 5px; font: inherit; }
.tiskopis textarea { display: block; width: 100%; margin-top: 4px; border: 1px solid #333; border-radius: 0;
    background: rgba(255,255,255,.75); min-height: 2.8em; font: inherit; padding: 3px 5px; resize: vertical; }
.tp-volba { display: inline-flex; gap: 5px; align-items: center; margin: 0 6px 0 10px; }
.tp-volba input { width: 18px; height: 18px; accent-color: #1d2330; }
.tp-volba:has(input:checked) { font-weight: bold; }
.tp-pozn { font-size: .8rem; color: #444; margin: 6px 0 10px; }
.tp-uvaha { margin: 14px 0 4px; }
.tp-seznam { margin: 4px 0; padding-left: 22px; }
.tp-seznam li { margin: 9px 0; }
.tp-foto { margin-top: 12px; display: block; }
.tp-paticka { font-style: italic; font-size: .75rem; text-align: justify; margin-top: 14px; line-height: 1.35; }
.tp-podpis { display: none; }
.tiskopis input:disabled, .tiskopis textarea:disabled { color: #000; -webkit-text-fill-color: #000; opacity: 1; }
@media (max-width: 700px) {
    .tiskopis { padding: 14px 12px; font-size: 15px; }
    .tp-pole { flex: 1 1 100%; flex-wrap: wrap; }
    .tiskopis .tp-pole input[type=text] { width: 100%; flex: 1 1 100%; }
}
@media print {
    @page { size: A4; margin: 8mm 10mm; }
    .tiskopis { border: 0; background: none; padding: 0; font-size: 9pt; line-height: 1.25; max-width: none; margin: 0; }
    .tp-nadpis { font-size: 14pt; margin-bottom: 2mm; text-shadow: none; }
    .tp-radek { margin: 1.1mm 0; gap: 0 5mm; }
    .tiskopis .tp-pole input[type=text] { background: none; padding: 0 1mm; font-size: 9pt; }
    .tp-seznam { margin: 1mm 0; padding-left: 5mm; }
    .tp-seznam li { margin: .9mm 0; }
    .tiskopis textarea { min-height: 0; height: 4.4mm; border: 0; border-bottom: 1px solid #333; background: none; overflow: hidden; resize: none; padding: 0 1mm; margin-top: .5mm; }
    .tiskopis textarea[name=dulezite_udaje] { height: 8mm; }
    .tp-volba input { width: 3mm; height: 3mm; }
    .tp-pozn { font-size: 6.5pt; margin: .8mm 0; }
    .tp-uvaha { margin: 1.5mm 0 .5mm; }
    .tp-foto { margin-top: 1.5mm; }
    .tp-paticka { font-size: 6.4pt; margin-top: 1.5mm; }
    .tp-podpis { display: block; margin-top: 5mm; font-size: 9pt; }
    .tisk-skryt { display: none !important; }
}
