/*  -----------------------------------Formulář-----------------------------------------------  */

/* kde se používají #seznamy ? */
#seznamy dt label, 
#seznamy dd label {
  font-weight: 400;
}

#seznamy dt.required label, 
#seznamy dd.required label {
  font-weight: 700;
}

dl dd {
  padding-bottom: 0.5em;
}



/* Chybný input nebo textarea */
.input-error input,
.input-error textarea {
  border: 2px solid #c62828;
  background-color: #ffebee;
  border-radius: 5px;
  transition: all 0.2s ease-in-out;
}

/* Label v chybovém stavu (červeně) */
dt.input-error label {
  color: #c62828;
  font-weight: bold;
}

/* Chybová zpráva pod polem */
.form-error {
  color: #c62828;
  font-size: 0.9em;
  margin-top: 0.3em;
  padding-left: 0.5em;
  padding-bottom: 0.5em;
  display: block;
}

/* Bonus: jemný hover efekt pro přehlednost */
.input-error input:hover,
.input-error textarea:hover {
  background-color: #ffe0e0;
  border-color: #b71c1c;
}


/* odhlášení z novinek */
.unsubscribe-buttons {
  margin-top: 20px;
}

.unsubscribe-buttons .btn-red {
  background-color: #c20116;
  color: white;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  margin-right: 10px !important;
}

.unsubscribe-buttons .btn-red:hover {
  background-color: #a90012;
  transform: scale(1.05);
}

.unsubscribe-buttons .btn-green {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.unsubscribe-buttons .btn-green:hover {
  background-color: #218838;
  transform: scale(1.05);
}







/* Základní vzhled SweetAlert2 */
.swal2-popup.litomysl-popup {
  font-size: 0.95em;
  background-color: #fdfdfd;
  border: 2px solid #9b1c2e;
  border-radius: 10px;
  width: 24em;
  max-width: 90vw;
  padding: 1em;
  box-shadow: 0 0 20px rgba(0,0,0,.1);
  overflow-x: hidden;
}

/* Nadpis */
.swal2-title.litomysl-title {
  color: #9b1c2e;
  font-weight: bold;
  font-size: 1.4em;
  text-align: center;
  margin: 0 auto 0.5em -1em; /* tvoje levé posunutí pro desktop */
}

/* Zarovnání a mezery u tlačítek */
.swal2-actions {
  gap: .6em;
  flex-wrap: wrap;
}

/* Primární tlačítko (potvrdit) */
.litomysl-button {
  background-color: #9b1c2e;
  color: #FFF;
  font-weight: bold;
  font-size: 0.95em;
  padding: 0.55em 1.8em;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .2s ease, transform .05s ease, box-shadow .2s ease;
}

.litomysl-button:hover { background-color: #7e1724; }
.litomysl-button:active { transform: translateY(1px); }

/* Focus (přístupnost) */
.litomysl-button:focus,
.litomysl-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212,175,55,.35);
}




/* Disabled / loading stav */
.swal2-confirm.swal2-loading,
.litomysl-button:disabled {
  opacity: .7;
  cursor: not-allowed;
}

/* Sekundární tlačítko (zrušit) */
.litomysl-button--secondary {
  background-color: #eee;
  color: #333;
  font-weight: 600;
  font-size: 0.95em;
  padding: 0.55em 1.6em;
  border-radius: 6px;
  border: 2px solid #ddd;
  transition: background-color .2s ease, border-color .2s ease;
}
.litomysl-button--secondary:hover { background-color: #e2e2e2; border-color: #d2d2d2; }
.litomysl-button--secondary:focus,
.litomysl-button--secondary:focus-visible { box-shadow: 0 0 0 3px rgba(155,28,46,.25); }

/* Jen uvnitř SweetAlert2 – tvoje existující utility */
.swal2-popup.litomysl-popup .chyba,
.swal2-popup.litomysl-popup .zvyrazneni {
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  padding: 30px 20px;
  overflow-x: hidden;
}

/* Malé obrazovky: zmenšíme padding a šířku */
@media (max-width: 420px) {
  .swal2-popup.litomysl-popup { width: 92vw; padding: .8em; }
  .swal2-title.litomysl-title { font-size: 1.25em; margin-left: 0; }
}








/* Responsivní přizpůsobení pro menší obrazovky */
@media (max-width: 480px) {
  .swal2-popup.litomysl-popup {
    font-size: 0.9em;
    width: 90vw;
    padding: 0.8em;
  }

  .swal2-title.litomysl-title {
    font-size: 1.2em;
    margin: 0 auto 0.5em -0.5em; /* jemnější posun na mobilech */
  }

  .swal2-confirm.litomysl-button {
    font-size: 0.9em;
    padding: 0.4em 1.5em;
  }
}



/* Styl jen pro kalendář */
#rezervacni-kalendar table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}

#rezervacni-kalendar td {
  width: 14.2%;
  height: 3em;
  border: 1px solid #ccc;
  vertical-align: middle;
  text-align: center;
  padding: 0.5em;
  font-size: 1em;
}

#rezervacni-kalendar td.available a {
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  width: 100%;
  height: 100%;
  line-height: 2.5em;
  color: #9b1c2e;
}
/*
#rezervacni-kalendar td.available a:hover {
  background-color: #f2f2f2;
  border-radius: 5px;
}
*/
#rezervacni-kalendar td.unavailable {
  background-color: #f9f9f9;
  color: #ccc;
}

#rezervacni-kalendar td.today {
  border: 2px solid #d4af37;
}




/* rezervační kalendář tržnice */

.vendor-info   { padding:8px 0 12px; font-size:.9em; line-height:1.35; }
.ban-alert     { margin-top:4px; color:#b74242; font-weight:600; }

.den         { font-weight:600; line-height:1.2; margin-bottom:2px; }
.mesic-mini  { font-size:.65em; line-height:1; color:#666; }

/* stav dne */
td.available   { background:#f2f2f2; }          /* světle šedé pole */
td.today       { background:#ffeec2; }          /* dnešek zůstává zvýrazněný */
td.unavailable { background:#f7f7f7; color:#bbb; }
td.outOfRange  { background:#fafafa; color:#e0e0e0; }



/* =============== 1. KONTEJNER ŘÁDKU STOLŮ ======================== */
.stoly {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 4px;
  width: 100%;
}

@media (max-width: 1400px) {
  .stoly {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 950px) {
  #rezervacni-kalendar .stoly {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}


/* =============== 2. VÝCHOZÍ VZHLED JEDNOHO STOLU ================= */
.stul{
  position:relative;         /* kvůli ikonám a tooltipu */
  flex:1 1 0;
  aspect-ratio:1/1;          /* čtverec */
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1rem;
  line-height:1;
  border:1px solid;
  border-radius:4px;
  user-select:none;
}


/* =============== 3. BAREVNÉ STAVY =================================*/

/* volný */
.stul.free{      background:#fff;    border-color:#8bc98f; color:#2a7d34; cursor:pointer; }
.stul.free:hover{background:#2a7d34; border-color:#2a7d34; color:#fff;}

/* moje – bude dále upřesněno (cancellable / locked) */
.stul.mine{ color:#000; }

/* moje (lze zrušit) */
.stul.mine.cancellable{ background:#ffcf5c; border-color:#d49b1b; cursor:pointer; }

/* moje (už nelze zrušit) */
.stul.mine.locked{ background:#ffcf5c; border-color:#d49b1b; border-style:dashed; cursor:not-allowed; }

/* zabrané cizí / limity / ban */
.stul.taken     { background:#f7d7d7; border-color:#e39d9d; color:#000;   cursor:default;      }
.stul.limit,
.stul.weeklimit { background:#e7e7e7; border-color:#d0d0d0; color:#9a9a9a;cursor:not-allowed; }
.stul.banned    { background:#ececec; border-color:#d5d5d5; color:#a0a0a0;cursor:not-allowed; }

/* =============== 4. IKONKY V ROHU (pouze ::before) =============== */
.stul.mine.cancellable::before{
  content:'×';                           /* křížek = lze zrušit */
  position:absolute; top:-2px; right:0px;
  font-weight:700; font-size:.9em; line-height:1;
}
.stul.mine.locked::before{
  content:'\1F512';                      /* 🔒 = zamčeno */
  position:absolute; top:-4px; right:-4px;
  font-size:.85em; line-height:1;
}

/* =============== 5. TOOLTIP (společný) =========================== */
/* — zobrazí se na libovolném stolu, který nese atribut data-tip —  */
.stul[data-tip]:hover::after{
  content:attr(data-tip);
  position:absolute;
  top:-7px;                         /* 10 px nad horní hranou stolu */
  left:50%; transform:translate(-50%, -100%);   /* vycentrovat */
  background:#333; color:#fff;
  font-size:.9em; white-space:nowrap;
  padding:0.5em 0.5em; border-radius:4px;
  z-index:10; pointer-events:none;
}

/* ===== tooltip – šipka =========================================== */
.stul[data-tip]:hover::before{
    content:'';
    position:absolute;
    top:-11px;                          /* doladíš: větší číslo ⇒ šipka výš */
    left:50%; transform:translateX(-50%) rotate(45deg);
    width:8px; height:8px;
    background:#333;
    z-index:10; pointer-events:none;
}

/* =============== 6. HOVER EFEKTY, KTERÉ NEMÁME RÁDI ============== */
.stul.limit:hover,
.stul.weeklimit:hover,
.stul.banned:hover,
.stul.mine.locked:hover{
  /* žádná změna barvy */
  background:inherit; color:inherit;
}






.trznice-legenda{
  margin-top:1.2rem; font-size:.9em;
}
.trznice-legenda ul{
  list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:12px;
}
.trznice-legenda li{
  display:flex; align-items:center; gap:6px;
}
.trznice-legenda .stul{
  width:18px; height:18px; border-radius:4px; border:1px solid;           /* tvar */
}
