/* Halaman awam: katalog fasiliti, halaman maklumat fasiliti, footer. */

.language {
  color: var(--ink);
  text-decoration: none;
}

.top-actions {
  margin-left: auto;
}

.top-actions .button {
  color: var(--black);
  font-size: 14px;
  padding: 10px 16px;
  text-decoration: none;
}

.detail-cta {
  align-items: center;
  display: flex;
  gap: 16px;
  margin: 16px 0 0;
}

.detail-cta a:not(.button) {
  color: var(--ink);
  font-weight: 700;
}

.detail-cta .button {
  color: var(--black);
  text-decoration: none;
}

a.facility-card {
  color: inherit;
  display: block;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

a.facility-card:hover,
a.facility-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 12px 30px #0000000f;
}

.card-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* Cara tempahan */
.how-to {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 72px 6vw;
}

.how-to h2,
.page-header h1,
.facility-group h2,
.facility-detail h1 {
  font: 700 38px "Playfair Display", serif;
  margin: 0;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.steps li {
  border-top: 2px solid var(--gold);
  counter-increment: step;
  display: grid;
  gap: 8px;
  padding-top: 18px;
}

.steps li::before {
  color: var(--gold);
  content: "0" counter(step);
  font: 700 26px "Playfair Display", serif;
}

.steps span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Senarai fasiliti */
.page-header {
  background: var(--black);
  color: #fff;
  padding: 56px 6vw;
}

.page-header p:last-child {
  color: #c8c8c8;
  margin: 12px 0 0;
  max-width: 620px;
}

.facility-group + .facility-group {
  margin-top: 48px;
}

.facility-group h2 {
  font-size: 26px;
  margin-bottom: 18px;
}

/* Maklumat fasiliti */
.facility-detail {
  padding: 36px 6vw 72px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
}

.breadcrumb a {
  color: var(--ink);
  font-weight: 600;
}

.detail-grid {
  align-items: start;
  display: grid;
  gap: 40px;
  grid-template-columns: 1.4fr 1fr;
}

.lead {
  color: #45433f;
  font-size: 17px;
  line-height: 1.7;
  max-width: 640px;
}

.detail-image {
  margin: 24px 0 0;
}

.detail-image img {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.detail-image figcaption {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.detail-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
  position: sticky;
  top: 106px;
}

.detail-panel h2 {
  font-size: 13px;
  letter-spacing: .12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.detail-panel h2:not(:first-child) {
  margin-top: 26px;
}

.detail-panel dl {
  margin: 0;
}

.detail-panel dl div {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 11px 0;
}

.detail-panel dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-panel dd {
  font-weight: 700;
  margin: 0;
  text-align: right;
}

.policy-list {
  display: grid;
  font-size: 14px;
  gap: 10px;
  line-height: 1.55;
  margin: 0;
  padding-left: 18px;
}

.coming-soon {
  background: var(--gold-light);
  border-radius: 8px;
  color: #6f510b;
  font-size: 13px;
  font-weight: 700;
  margin: 24px 0 0;
  padding: 12px 14px;
}

/* Footer */
.site-footer {
  align-items: end;
  background: var(--black);
  color: #bdbdbd;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 24px;
  justify-content: space-between;
  line-height: 1.6;
  padding: 40px 6vw;
}

.site-footer .brand-light {
  margin-bottom: 0;
}

.site-footer address {
  font-style: normal;
  text-align: right;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  /* styles.css menyembunyikan butang bahasa pada telefon; kekalkan untuk dwibahasa. */
  .language {
    display: inline;
  }

  .hide-mobile {
    display: none;
  }

  .topbar {
    gap: 12px;
  }

  .how-to,
  .page-header,
  .facility-detail,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .how-to h2,
  .page-header h1,
  .facility-detail h1 {
    font-size: 30px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .site-footer address {
    text-align: left;
  }
}

/* Tetapan fasiliti pada halaman awam (Modul 3) */
.closure-notice {
  background: #fff0d5;
  border-left: 4px solid var(--amber);
  border-radius: 7px;
  color: #6d4a0e;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 14px 16px;
}

.closure-notice.ongoing {
  background: #fae4e1;
  border-color: var(--red);
  color: #7d2a24;
}

.subheading {
  font: 700 24px "Playfair Display", serif;
  margin: 32px 0 12px;
}

.layout-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  max-width: 520px;
  padding: 0;
}

.layout-list li {
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
}

.rate-for {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.detail-panel .rate-list dd small,
.detail-panel .rate-list dt small {
  color: var(--muted);
  font-weight: 500;
}

/* Kalendar & semakan kekosongan (Modul 4) */
.search-panel .field select,
.search-panel .field input {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  font: inherit;
  padding: 10px 0;
  width: 100%;
}

.search-panel .field select:focus,
.search-panel .field input:focus {
  border-color: var(--gold);
  outline: none;
}

.topbar nav {
  gap: 24px;
}

.calendar-page {
  padding: 36px 6vw 72px;
}

.calendar-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-toolbar h1,
.calendar-toolbar h2 {
  font: 700 26px "Playfair Display", serif;
  margin: 0;
  text-align: center;
}

.calendar-toolbar > div {
  text-align: center;
}

.calendar-toolbar .button {
  text-decoration: none;
  white-space: nowrap;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px 18px;
  margin-bottom: 14px;
}

.legend-item {
  align-items: center;
  display: flex;
  gap: 6px;
}

.cell-dot {
  border-radius: 3px;
  display: inline-block;
  height: 12px;
  width: 12px;
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
}

.week-table {
  border-collapse: collapse;
  min-width: 820px;
  width: 100%;
}

.week-table th,
.week-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  text-align: center;
}

.week-table thead th {
  background: #f9f8f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.week-table thead th.today {
  background: var(--gold-light);
  color: #6f510b;
}

.week-table tbody th {
  font-size: 13px;
  min-width: 180px;
  text-align: left;
}

.week-table tbody th a {
  color: var(--ink);
}

.week-table td.past {
  opacity: .45;
}

.cell {
  border-radius: 6px;
  display: block;
  /* Menahan label .sr-only (position: absolute) di dalam bekas skrol jadual. */
  position: relative;
  font-size: 11px;
  font-weight: 700;
  padding: 10px 4px;
  text-decoration: none;
}

.state-tersedia { background: #e5f2e9; color: var(--green); }
.state-terhad { background: #fff0d5; color: var(--amber); }
.state-penuh { background: #fae4e1; color: var(--red); }
.state-tutup { background: #eeece6; color: #666; }

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

.date-jump {
  align-items: end;
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.date-jump input,
.availability-form input,
.availability-form select {
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  padding: 11px;
  width: 100%;
}

.field-block {
  display: grid;
  gap: 7px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
}

.field-error {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.day-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

.panel-lite {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}

.panel-lite .subheading {
  margin-top: 0;
}

.slot {
  align-items: center;
  border-left: 4px solid;
  border-radius: 6px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 8px;
  padding: 10px 12px;
}

.slot small {
  color: var(--muted);
}

.slot a {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.slot-free { background: #e5f2e9; border-color: var(--green); }
.slot-pending { background: #fff0d5; border-color: var(--amber); }
.slot-booked { background: #fae4e1; border-color: var(--red); }
.slot-closed { background: #eeece6; border-color: #999; }

.availability-form {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 20px;
}

.availability-form .wide {
  grid-column: 1 / -1;
}

.result-box {
  border-left: 5px solid;
  border-radius: 10px;
  padding: 20px 22px;
}

.result-box h2 {
  font: 700 24px "Playfair Display", serif;
  margin: 0 0 8px;
}

.result-box ul {
  line-height: 1.7;
  margin: 8px 0;
  padding-left: 20px;
}

.result-box a {
  color: var(--ink);
  font-weight: 700;
}

.result-ok { background: #e5f2e9; border-color: var(--green); }
.result-no { background: #fae4e1; border-color: var(--red); }

.result-box + .result-box {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .day-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .calendar-page {
    padding: 24px 20px 56px;
  }

  .calendar-toolbar {
    flex-wrap: wrap;
  }

  .calendar-toolbar > div,
  .calendar-toolbar h2 {
    order: -1;
    width: 100%;
  }
}

/* Maklum balas & bantuan (Modul 8) */
.stars {
  color: var(--gold);
  letter-spacing: 2px;
}

.rating-summary {
  font-weight: 700;
  margin: 8px 0 0;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-list blockquote {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0;
  padding: 14px 16px;
}

.review-list p {
  line-height: 1.6;
  margin: 6px 0;
}

.review-list cite {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.footer-link {
  color: #fff;
  font-weight: 700;
}

.help-grid {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: 320px minmax(0, 1fr);
}

.contact-card p {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
}

.contact-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-card a {
  color: var(--ink);
  font-weight: 700;
}

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 14px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq p {
  line-height: 1.7;
}

.faq .table-wrap {
  margin-top: 12px;
}

.faq .data-table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}

.faq .data-table th,
.faq .data-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

@media (max-width: 900px) {
  .help-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
