/* ===========================================================================
   Booking flow - steps 1 to 3.
   Uses the site palette from style.css; nothing here leaks to other pages.
   =========================================================================== */

.booking-hero {
  padding-bottom: 32px;
}

.booking-section {
  background: var(--bg-off-white);
}

.booking-container {
  max-width: 720px;
}

/* --- Progress ------------------------------------------------------------- */

.booking-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  counter-reset: none;
}

.booking-step {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 0;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  position: relative;
}

.booking-step + .booking-step::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 1px;
  background: #d9d9d9;
  margin-right: 2px;
}

.booking-step-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.88rem;
  background: #e8e8e8;
  color: #5c5c5c;
}

.booking-step-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-step.is-current .booking-step-num {
  background: var(--brand-gold);
  color: var(--brand-black);
}

.booking-step.is-current {
  color: var(--text-dark);
  font-weight: 600;
}

.booking-step.is-done .booking-step-num {
  background: var(--brand-green);
  color: #fff;
}

.booking-step.is-done .booking-step-num::after {
  content: "\2713";
}

.booking-step.is-done .booking-step-num {
  font-size: 0.95rem;
  text-indent: -9999px;
  position: relative;
}

.booking-step.is-done .booking-step-num::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-indent: 0;
}

/* --- Panels --------------------------------------------------------------- */

.booking-panel {
  background: var(--bg-white);
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 26px 24px;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(45, 95, 79, 0.05);
}

.booking-panel.is-disabled {
  opacity: 0.55;
  background: #fbfbfb;
  box-shadow: none;
}

.booking-panel.is-collapsed {
  background: #fbfcfb;
  box-shadow: none;
}

.booking-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.booking-panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.booking-amount {
  font-weight: 700;
  color: var(--brand-green);
  background: rgba(45, 95, 79, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.booking-edit {
  font-size: 0.88rem;
  color: var(--brand-green);
}

.booking-panel-calendar {
  padding: 10px;
  overflow: hidden;
}

/* --- Summary of step 1 ---------------------------------------------------- */

.booking-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 14px;
  margin: 0;
}

.booking-summary dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.booking-summary dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-dark);
  overflow-wrap: anywhere;
}

/* --- Form ----------------------------------------------------------------- */

.booking-form {
  display: block;
}

.booking-field {
  margin-bottom: 18px;
}

.booking-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.booking-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.booking-field input:focus {
  outline: none;
  border-color: var(--brand-green-light);
  box-shadow: 0 0 0 3px rgba(74, 137, 117, 0.15);
}

.booking-field input.has-error {
  border-color: #c0564a;
}

.booking-hint {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin: 6px 0 0;
  line-height: 1.5;
}

.booking-error {
  font-size: 0.85rem;
  color: #a8392c;
  margin: 6px 0 0;
  font-weight: 500;
}

.booking-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.booking-muted {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.65;
  margin: 0;
}

.booking-fallback {
  margin-top: 18px;
  text-align: center;
}

.booking-linkbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--brand-green);
  text-decoration: underline;
  cursor: pointer;
}

/* --- Alerts --------------------------------------------------------------- */

.booking-alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.94rem;
  line-height: 1.6;
  border: 1px solid transparent;
}

.booking-alert code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.booking-alert-error {
  background: #fdf3f2;
  border-color: #e0b4ae;
  color: #8c3025;
}

.booking-alert-info {
  background: #fdf8ec;
  border-color: #e6dcc0;
  color: #7a6526;
}

.booking-alert-success {
  background: #eef7f2;
  border-color: var(--brand-green-light);
  color: var(--brand-green-dark);
}

/* --- Pending state -------------------------------------------------------- */

.booking-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px 16px;
  background: #fbfcfb;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  margin-top: 16px;
}

.booking-status p {
  margin: 0;
  color: var(--text-dark);
  font-weight: 500;
}

.booking-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(201, 169, 97, 0.3);
  border-top-color: var(--brand-gold);
  animation: booking-spin 0.9s linear infinite;
}

@keyframes booking-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .booking-spinner {
    animation-duration: 3s;
  }
}

/* --- Till fallback -------------------------------------------------------- */

.booking-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 20px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.booking-divider::before,
.booking-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e2e2;
}

.booking-till {
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 0.95rem;
}

.booking-till strong {
  color: var(--text-dark);
}

.booking-till-number {
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  background: rgba(201, 169, 97, 0.16);
  padding: 2px 10px;
  border-radius: 6px;
}

/* --- Receipt strip on step 3 ---------------------------------------------- */

.booking-receipt {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 16px;
  background: var(--bg-white);
  border: 1px solid #e6e6e6;
  border-left: 4px solid var(--brand-green);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.booking-receipt-label {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.booking-receipt strong {
  color: var(--text-dark);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.booking-expiry {
  text-align: center;
  margin-top: 18px;
  font-size: 0.88rem;
}

/* --- Payment tabs: M-Pesa | Other payment --------------------------------- */

.pay-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 22px;
  background: #eef1ef;
  border-radius: 11px;
}

.pay-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  text-align: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.pay-tab:hover {
  color: var(--text-dark);
}

.pay-tab[aria-selected="true"] {
  background: var(--bg-white);
  color: var(--brand-green-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pay-tab:focus-visible {
  outline: 2px solid var(--brand-green-light);
  outline-offset: 2px;
}

.pay-intro {
  margin-bottom: 18px;
}

.pay-footnote {
  text-align: center;
  margin-top: 12px;
}

.pay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pay-chips[hidden] {
  display: none;
}

.pay-chip {
  min-height: 36px;
  padding: 6px 15px;
  border: 1px solid #d4d4d4;
  border-radius: 999px;
  background: var(--bg-white);
  font: inherit;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.pay-chip:hover {
  border-color: var(--brand-green-light);
}

.pay-chip.is-active {
  border-color: var(--brand-green);
  background: rgba(45, 95, 79, 0.09);
  color: var(--brand-green-dark);
  font-weight: 600;
}

.pay-chip:focus-visible {
  outline: 2px solid var(--brand-green-light);
  outline-offset: 2px;
}

.booking-field textarea {
  width: 100%;
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  color: var(--text-dark);
  background: var(--bg-white);
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.booking-field textarea:focus {
  outline: none;
  border-color: var(--brand-green-light);
  box-shadow: 0 0 0 3px rgba(74, 137, 117, 0.15);
}

/* --- Narrow screens ------------------------------------------------------- */

@media (max-width: 640px) {
  .booking-panel {
    padding: 20px 16px;
  }

  .booking-steps {
    gap: 4px;
  }

  .booking-step-label {
    display: none;
  }

  .booking-step {
    flex: 0 0 auto;
  }

  .booking-step.is-current .booking-step-label {
    display: inline;
  }

  .booking-panel-calendar {
    padding: 4px;
  }

  .pay-tab {
    font-size: 0.9rem;
    padding: 9px 8px;
  }
}

.booking-privacy {
  text-align: center;
  margin-top: 12px;
}

.booking-privacy a {
  color: var(--brand-green);
}
