/* Navigation and form labels fit within one line; descriptions keep their natural measure. */
#main-navigation a, .breadcrumbs, .card h3, .section h2, .venue-copy h2,
.detail-copy h1, .detail-items h2, .detail-list h3,
.venue-rates h2, .venue-rates th, .staff-addon h3,
#enquiry .planner-head h2, #enquiry .planner-field > span,
#enquiry .planner-actions > *, #enquiry .planner-finder-actions > button,
#enquiry .planner-summary strong, [data-fit-label] {
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: nowrap;
}

.card-body h3 { inline-size: 100%; }
.section-top > div:first-child { min-inline-size: 0; max-inline-size: 100%; }
.staff-addon h3, #enquiry .planner-summary strong { display: block; }

.venue-rates { container: rates / inline-size; }
.venue-rates table {
  table-layout: fixed;
  margin-block: .9rem 1rem;
}
.venue-rates thead th {
  padding: .7rem .45rem;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
}
.venue-rates thead th:first-child { width: 39%; }
.venue-rates thead th:nth-child(2) { width: 30%; }
.venue-rates thead th:nth-child(3) { width: 31%; }
.venue-rates:lang(ms) thead th:first-child { width: 46%; }
.venue-rates:lang(ms) thead th:nth-child(2),
.venue-rates:lang(ms) thead th:nth-child(3) { width: 27%; }
.venue-rates tbody th, .venue-rates tbody td:not(.rate-inclusions) {
  padding: .95rem .45rem .25rem;
  line-height: 1.25;
  vertical-align: baseline;
}
.venue-rates tbody th { font-weight: 600; }
.venue-rates tbody td:not(.rate-inclusions) {
  font-size: 1.03rem;
  font-variant-numeric: tabular-nums;
}
.venue-rates td.rate-inclusions {
  padding: .25rem .45rem .95rem;
  line-height: 1.45;
}
.venue-rates .staff-addon {
  margin-block: 1rem .8rem;
  border-radius: 0 6px 6px 0;
}
.venue-rates .staff-addon h3 { line-height: 1.3; font-weight: 500; }

@media (max-width: 700px) {
  .detail-copy .venue-rates {
    /* Keep the first character clear of the fixed round shortcut buttons. */
    margin-inline-start: max(32px, calc(env(safe-area-inset-left) + 28px));
    padding-inline-start: 0;
  }
  .venue-rates thead th { padding-inline: .25rem; }
  .venue-rates tbody th, .venue-rates tbody td { padding-inline: .25rem; }
  .venue-rates .staff-addon { padding: .65rem .8rem; }
}

/* In tight tables give the tier name its own full-width line so the prices and
   duration labels stay readable at the user's chosen text size. */
@container rates (max-width: 18.5rem) {
  .venue-rates table, .venue-rates thead, .venue-rates tbody { display: block; }
  .venue-rates tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .venue-rates thead th:nth-child(n), .venue-rates:lang(ms) thead th:nth-child(n) { width: auto; }
  .venue-rates thead th:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .venue-rates thead th:nth-child(2), .venue-rates tbody td:nth-child(2) { text-align: start; }
  .venue-rates tbody th, .venue-rates .rate-inclusions { grid-column: 1 / -1; }
  .venue-rates tbody td:not(.rate-inclusions) { padding-block: .2rem; }
}
