/* =========================================================
   Colinas del Oso – Booking History Polish
   Safe with spinner + CSP
   ========================================================= */

/* ---------- Page container ---------- */
.booking-history-surface {
  background: var(--ui-bg-main);
  padding-bottom: 3rem;
}

/* ---------- Cards ---------- */
.booking-history-card {
  background: var(--ui-bg-card);
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

/* ---------- Headings ---------- */
.booking-history-card h2,
.booking-history-card h3 {
  color: var(--ui-text-primary);
}

.booking-history-subtitle {
  color: var(--ui-text-secondary);
  font-size: .95rem;
}

/* ---------- Tables ---------- */
.booking-history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.booking-history-table thead th {
  background: var(--ui-bg-main);
  color: var(--ui-text-secondary);
  font-weight: 600;
  font-size: .85rem;
  border-bottom: 1px solid var(--ui-border);
  padding: .75rem;
}

.booking-history-table tbody td {
  padding: .75rem;
  border-bottom: 1px solid var(--ui-border);
  color: var(--ui-text-primary);
  vertical-align: middle;
}

.booking-history-table tbody tr:hover {
  background: rgba(0,0,0,.025);
}

/* ---------- Status badges ---------- */
.badge-status {
  font-size: .75rem;
  padding: .35em .6em;
  border-radius: 999px;
  font-weight: 600;
}

.badge-confirmed {
  background: rgba(46,125,50,.12);
  color: var(--ui-success);
}

.badge-cancelled {
  background: rgba(178,58,72,.12);
  color: var(--ui-danger);
}

.badge-pending {
  background: rgba(224,168,0,.15);
  color: var(--ui-warning);
}

/* ---------- Office labels ---------- */
.office-pill {
  font-size: .75rem;
  padding: .3em .6em;
  border-radius: 999px;
  background: var(--ui-brand-soft);
  color: var(--ui-brand-primary);
  font-weight: 600;
}

/* ---------- Empty state ---------- */
.booking-history-empty {
  text-align: center;
  color: var(--ui-text-muted);
  padding: 3rem 1rem;
}

.booking-history-empty img {
  max-width: 180px;
  opacity: .9;
  margin-bottom: 1rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .booking-history-table thead {
    display: none;
  }

  .booking-history-table tbody tr {
    display: block;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    margin-bottom: 1rem;
    padding: .75rem;
  }

  .booking-history-table tbody td {
    display: flex;
    justify-content: space-between;
    border-bottom: none;
    padding: .35rem 0;
    font-size: .9rem;
  }

  .booking-history-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--ui-text-secondary);
  }
}

/* ---------- IMPORTANT: Spinner safety ---------- */
/* Never touch these — prevents infinite spinner bugs */
#spinner {
  z-index: 1055;
}

body.loading {
  overflow: auto;
}
