/* ============================================================
   mod_deer_hours – v1.4.0
   Otevírací doba / program (3 sloupce).
   Pouze strukturální pravidla. Barvy, typografie a řezy
   přicházejí z utility tříd (typo-*, text-*) – zde se
   žádné design tokeny nehardcodují.

   Cesta assetu: joomla.asset.json uvádí "mod_deer_hours/mod_deer_hours.css",
   složku /css/ si HTMLHelper::includeRelativeFiles() doplňuje sám.

   POZOR na specificitu: všechna pravidla pro buňky drží jednotnou
   úroveň .deer-hours__table th.deer-hours__th / td.deer-hours__cell
   = (0,2,1). Míchání s holým .deer-hours__th (0,1,0) způsobí, že
   deklarace prohraje s hromadným pravidlem a tiše zmizí.
   ============================================================ */

.deer-hours {
  --hours-col-day: 16%;
  --hours-col-time: 16%;
  --hours-line: color-mix(in srgb, var(--c-canvas) 15%, transparent);
  --hours-cell-py: 20px;
  --hours-gap-x: 16px;
  display: block;
}

/* Full-bleed breakout z Bootstrap containeru */
.deer-hours--bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.deer-hours--pad {
  padding-block: var(--space-5);
}

.deer-hours__table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: transparent;
}

/* --- Buňky: společný základ + linka pod hlavičkou i řádky --- */
.deer-hours__table th.deer-hours__th,
.deer-hours__table td.deer-hours__cell {
  padding: var(--hours-cell-py) var(--hours-gap-x);
  padding-left: 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hours-line);
}

.deer-hours__table th.deer-hours__th:last-child,
.deer-hours__table td.deer-hours__cell:last-child {
  padding-right: 0;
}

/* Text řádků vždy na středu výšky mezi linkami */
.deer-hours__table td.deer-hours__cell {
  vertical-align: middle;
}

/* Hlavička – bez horního odsazení, text dosedá na svou linku */
.deer-hours__table th.deer-hours__th {
  padding-top: 0;
  vertical-align: bottom;
}

/* Šířky sloupců */
.deer-hours__table th.deer-hours__th--day,
.deer-hours__table td.deer-hours__cell--day {
  width: var(--hours-col-day);
}

.deer-hours__table th.deer-hours__th--time,
.deer-hours__table td.deer-hours__cell--time {
  width: var(--hours-col-time);
}

.deer-hours__day,
.deer-hours__time,
.deer-hours__label,
.deer-hours__text {
  display: inline;
}

.deer-hours__label {
  margin-right: .3em;
}

.deer-hours__text > p:last-child {
  margin-bottom: 0;
}

/* Popisky sloupců na mobilu (::before) – na desktopu skryté */
.deer-hours__cell::before {
  content: none;
}

/* --- MOBIL: tabulka se skládá do karet ------------------- */
@media (max-width: 767.98px) {
  .deer-hours__table,
  .deer-hours__body,
  .deer-hours__row,
  .deer-hours__cell {
    display: block;
    width: 100%;
  }

  .deer-hours__head {
    display: none;
  }

  .deer-hours__row {
    padding-block: var(--hours-cell-py);
    border-bottom: 1px solid var(--hours-line);
  }

  .deer-hours__row:first-child {
    padding-top: 0;
  }

  /* Šířky sloupců na mobilu neplatí – karta je vždy přes celou šířku */
  .deer-hours__table td.deer-hours__cell,
  .deer-hours__table td.deer-hours__cell--day,
  .deer-hours__table td.deer-hours__cell--time {
    width: 100%;
    padding: 0 0 var(--space-2) 0;
    border-bottom: 0;
  }

  .deer-hours__table td.deer-hours__cell:last-child {
    padding-bottom: 0;
  }

  .deer-hours:not(.deer-hours--nolabels) .deer-hours__cell[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    line-height: 16px;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .5;
  }
}
