/* ==========================================================================
   AAZP – Timings & Entry Tariff, full width: the hours table on the left, the
   charges as a grid of small tables (one per group) on the right, on cream with
   a faded leaf pattern. Dark-green header rows, hairline rows.
   ========================================================================== */

.tt {
  --g2: 8px; --g3: 13px; --g4: 21px; --g5: 34px; --g6: 55px; --g7: 89px;
  --terra: #b4532a;
  --terra-deep: #933f1c;             /* hover on terracotta */
  --clay: #a26d57;                   /* toned-down terracotta for the hours block */
  --clay-deep: #8a5843;
  --ink: #2c3a34;
  --line: rgba(4, 67, 50, 0.1);
  --sheet: #fbfbf5;
  position: relative;
  isolation: isolate;
  padding: var(--g6) 0 var(--g7);
  background: var(--color-cream);
  overflow: hidden;
}

/* Faded leaves: a repeating tile of scattered leaves, strongest at the edges
   and fading out towards the tables */
.tt::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cdefs%3E%3Cg id='l'%3E%3Cpath d='M0-22C13-13 13 13 0 22-13 13-13-13 0-22Z'/%3E%3Cpath d='M0-20V24' fill='none' stroke='%23044332' stroke-width='1.2'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='%23044332'%3E%3Cuse href='%23l' transform='translate(40 46) rotate(-35)'/%3E%3Cuse href='%23l' transform='translate(150 30) rotate(50) scale(.7)'/%3E%3Cuse href='%23l' transform='translate(200 130) rotate(-70) scale(.9)'/%3E%3Cuse href='%23l' transform='translate(96 150) rotate(20) scale(1.15)'/%3E%3Cuse href='%23l' transform='translate(30 200) rotate(80) scale(.65)'/%3E%3Cuse href='%23l' transform='translate(180 215) rotate(-15) scale(.8)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: 0.07;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 30%, #000 85%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 30%, #000 85%);
}

/* --------------------------------------------------------------------------
   Container and the screen-reader-only page title
   -------------------------------------------------------------------------- */
/* Same edges as the header rows (34px gutters, 1600px cap), not the 85% container */
.tt > .container {
  width: calc(100% - 2 * var(--g5));
  max-width: 1600px;
}

.tt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Layout: hours (1 part) + tariff cards (2.618 parts, φ²)
   -------------------------------------------------------------------------- */
.tt-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 2.618fr);
  gap: var(--g6);
  align-items: start;
}

/* Tariff: as many 300px+ columns as fit; parking spans the whole row */
.tt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--g4);
  align-items: start;
}

.tt-cards .tt-table--wide { grid-column: 1 / -1; }

/* Parking: its six rows flow into columns instead of one long list */
.tt-table--wide thead,
.tt-table--wide tbody,
.tt-table--wide thead tr { display: block; }
.tt-table--wide thead tr { display: flex; justify-content: space-between; background: var(--color-green-dark); }
.tt-table--wide tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.tt-table--wide tbody tr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--g3);
  border-top: 1px solid var(--line);
}
.tt-table--wide tbody tr + tr { box-shadow: inset 1px 0 0 var(--line); }
.tt-table.tt-table--wide tbody th,
.tt-table.tt-table--wide tbody td { border-top: 0; }   /* the row draws the line */

.tt-hours { position: sticky; top: 140px; }

.tt-block__title {
  margin-bottom: var(--g4);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--color-green-dark);
}

/* --------------------------------------------------------------------------
   Table
   -------------------------------------------------------------------------- */
.tt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 var(--g4) var(--g5) -26px rgba(4, 67, 50, 0.45);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}

.tt-table thead th {
  padding: var(--g3) var(--g4);
  background: var(--color-green-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-cream);
}

.tt-table thead th:last-child { text-align: right; white-space: nowrap; }

.tt-table tbody th,
.tt-table tbody td {
  padding: var(--g3) var(--g4);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
}

.tt-table tbody th { font-weight: 500; color: var(--ink); }

.tt-table tbody td {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  color: var(--color-green-dark);
}

.tt-table tbody tr { transition: background-color 0.2s ease; }
.tt-table tbody tr:hover { background-color: rgba(4, 67, 50, 0.04); }

.tt-free {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(4, 67, 50, 0.08);
  font-size: 0.82rem;
  color: var(--color-green-dark);
}

/* Hours table: a toned-down terracotta (clay) for the header, today's row and
   badge, so it reads apart from the green tariff tables without shouting */
.tt-hours .tt-table { box-shadow: 0 var(--g4) var(--g5) -28px rgba(80, 60, 45, 0.4); }
.tt-hours .tt-table thead th { background: var(--clay); }
.tt-hours .tt-table td { font-weight: 500; color: var(--ink); }
.tt-hours .is-closed th,
.tt-hours .is-closed td { color: var(--clay-deep); }
.tt-hours .is-closed td { font-weight: 600; }
.tt-hours .tt-table tbody tr:hover { background-color: rgba(162, 109, 87, 0.04); }
.tt-hours .tt-table tbody tr.is-today { background-color: rgba(162, 109, 87, 0.07); }
.tt-hours .is-today th { font-weight: 700; color: var(--clay-deep); white-space: nowrap; }
.tt-hours .tt-today { background: var(--clay); }


.tt-today {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--color-green-dark);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  vertical-align: 2px;
  color: var(--color-cream);
}

/* --------------------------------------------------------------------------
   Under the hours: booking cut-off, notes, button
   -------------------------------------------------------------------------- */
.tt-callout {
  display: flex;
  align-items: center;
  gap: var(--g2);
  margin-top: var(--g4);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}

.tt-callout svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--clay);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.tt-callout strong { color: var(--clay-deep); }

.tt-notes {
  margin-top: var(--g4);
  padding-left: var(--g3);
  border-left: 2px solid rgba(162, 109, 87, 0.5);
}

.tt-notes p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.tt-notes p + p { margin-top: var(--g2); }
.tt-notes strong { color: var(--ink); }

.tt-book {
  margin-top: var(--g5);
  padding: var(--g3) var(--g4);
  border: 0;
  border-radius: 999px;
  background: var(--color-green-dark);
  box-shadow: 0 var(--g2) var(--g4) -13px rgba(4, 67, 50, 0.85);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-white);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tt-book:hover,
.tt-book:focus-visible { background: var(--clay); transform: translateY(-2px); }
.tt-book:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Tablet and phone: stacked
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .tt-layout { grid-template-columns: minmax(0, 1fr); gap: var(--g6); }
  .tt-hours { position: static; max-width: 560px; }
}

@media (max-width: 768px) {
  .tt > .container { width: calc(100% - 2 * var(--g4)); }
}

@media (max-width: 600px) {
  .tt { padding-top: var(--g5); }
  .tt-cards,
  .tt-table--wide tbody { grid-template-columns: minmax(0, 1fr); }
  .tt-table--wide tbody tr + tr { box-shadow: none; }
  .tt-table thead th,
  .tt-table tbody th,
  .tt-table tbody td { padding-left: var(--g3); padding-right: var(--g3); }
  .tt-table tbody th,
  .tt-table tbody td { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tt-book { transition: none; }
}
