/**
 * legacy.css — the component classes the customer dashboard, Pandit Corner
 * and the admin console were built against.
 *
 * Those three surfaces are internal and aren't part of the 2026 handoff, so
 * rather than rewrite their markup they keep their original class names —
 * restyled here in the new palette. Load it AFTER components.css: a few
 * names (.stepper, .empty-state, .otp-row, .tabs) mean something different
 * on the public pages, and load order is what keeps the two apart.
 *
 * Nothing new should use these classes — see components.css instead.
 */

/* ---------- Buttons ---------- */
.btn--secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: none;
}
.btn--secondary:hover:not([disabled]) { background: var(--ink); color: var(--cream); }

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--maroon-800);
  padding-inline: 14px;
  box-shadow: none;
}
.btn--ghost:hover:not([disabled]) { background: var(--maroon-tint); color: var(--maroon-800); }

.btn--brass {
  background: var(--gold);
  color: var(--gold-ink);
}
.btn--brass:hover:not([disabled]) { background: var(--gold-bright); color: var(--gold-ink); }

.btn--full { width: 100%; }

/* ---------- Cards ---------- */
.card--elevated {
  box-shadow: var(--shadow-m);
  border-color: transparent;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-warm);
  color: var(--ink-3);
}
.badge--teal { background: var(--green-tint); color: var(--green-800); }
.badge--brass { background: var(--gold-tint); color: var(--gold-deep); }
.badge--maroon { background: var(--maroon-tint); color: var(--maroon-800); }
.badge--muted { background: var(--surface-warm); color: var(--ink-3); }

/* ---------- Forms (bare-label variant) ---------- */
.field { margin-bottom: 24px; }
.field label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}
.field__error { display: none; }
.field[data-invalid="true"] .field__error { display: block; }

/* These pages use bare inputs rather than the .input/.select/.textarea
   classes, so the element selectors have to carry the styling. */
.dash-shell input, .dash-shell select, .dash-shell textarea,
.pandit-shell input, .pandit-shell select, .pandit-shell textarea,
.admin-shell input, .admin-shell select, .admin-shell textarea,
.tab-panel input, .tab-panel select, .tab-panel textarea,
.card input[type="text"], .card input[type="tel"], .card input[type="email"],
.card input[type="date"], .card input[type="time"], .card input[type="number"],
.card input[type="password"], .card select, .card textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 15px;
  color: var(--ink);
}
.card textarea, .tab-panel textarea { min-height: 110px; line-height: 1.55; resize: vertical; font-family: inherit; }

/* ---------- Address autocomplete (legacy markup) ---------- */
.address-autocomplete { position: relative; }
.address-autocomplete__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  inset-inline: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-m);
  max-height: 260px;
  overflow-y: auto;
}
.address-autocomplete__item {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
}
.address-autocomplete__item.is-active,
.address-autocomplete__item:hover { background: var(--surface-warm); }

/* ---------- Progress stepper (booking status tracker) ---------- */
.stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 0 0 8px;
  border: none;
  background: none;
  border-radius: 0;
  scrollbar-width: thin;
}
.stepper__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 76px;
  position: relative;
  text-align: center;
}
.stepper__step::before {
  content: "";
  position: absolute;
  top: 17px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line-strong);
  z-index: 0;
}
.stepper__step:first-child::before { display: none; }
.stepper__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-5);
}
.stepper__step[data-state="done"] .stepper__dot {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}
.stepper__step[data-state="done"]::before { background: var(--green-600); }
.stepper__step[data-state="active"] .stepper__dot {
  background: var(--maroon-600);
  border-color: var(--maroon-600);
  color: #fff;
  box-shadow: 0 0 18px -4px rgba(107, 30, 47, .8);
}
.stepper__label { font-size: 13px; color: var(--ink-3); max-width: 90px; }
.stepper__step[data-state="active"] .stepper__label { color: var(--ink); font-weight: 700; }

/* ---------- Dashboard tabs ---------- */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-warm);
  margin-bottom: 32px;
}
.tabs__btn {
  background: none;
  border: none;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--ink-3);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.tabs__btn:hover { color: var(--maroon-600); }
.tabs__btn[aria-selected="true"] {
  color: var(--maroon-800);
  border-bottom-color: var(--gold);
}
.tab-panel[hidden] { display: none; }

/* ---------- Data table ---------- */
.data-table { width: 100%; font-size: 15px; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-5);
  padding: 12px;
  border-bottom: 1px solid var(--line-warm);
}
.data-table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line-warm);
  vertical-align: middle;
}
@media (max-width: 720px) {
  .data-table thead { display: none; }
  .data-table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line-warm); }
  .data-table td { display: flex; justify-content: space-between; gap: 12px; border: none; padding: 6px 0; }
}

/* ---------- Status icon ---------- */
.status-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green-800);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 30px -6px rgba(47, 93, 86, .5);
}
.status-icon svg { width: 42px; height: 42px; }

/* ---------- OTP input (legacy flex variant) ---------- */
.otp-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  grid-template-columns: none;
}
.otp-row input {
  width: 48px;
  min-height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-family: var(--font-mono);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-warm);
}

/* ---------- Empty state (legacy, icon above copy) ---------- */
.empty-state {
  text-align: center;
  padding: 64px 16px;
  color: var(--ink-3);
  border: none;
  border-radius: 0;
}
.empty-state svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: #a97f31;
}

/* ---------- Upload well ---------- */
.upload-well {
  padding: 24px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-warm);
  text-align: center;
  color: var(--ink-3);
}
.upload-well svg { width: 28px; height: 28px; color: var(--amber); margin-bottom: 8px; }
.upload-well p { margin: 0; font-size: 14px; }

/* ---------- Alerts ---------- */
.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14.5px;
  line-height: 1.55;
}
.alert--info { background: var(--green-tint); color: var(--green-800); border-color: rgba(47, 93, 86, .2); }
.alert--warn { background: #f6ecd8; color: #96631f; border-color: rgba(150, 99, 31, .25); }
.alert--error { background: var(--error-bg); color: var(--error-ink); border-color: var(--error-border); }
.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-warm) 25%, #e8e0d0 37%, var(--surface-warm) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}

/* ---------- Odds and ends ---------- */
.muted { color: var(--ink-5); }
.total { font-weight: 700; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
