/* ===================================================================
   Maya Lounge – Guest Management App
   Brand: Cormorant Garamond + Jost, dark charcoal + gold (#c9a84c)
   =================================================================== */

/* ---------- Reset & Tokens ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #c9a84c;
  --gold-light:  #e8c96a;
  --gold-dark:   #9e7f2e;
  --slot-red:    #e02020;
  --slot-red-h:  #c41a1a;
  --charcoal:    #1a1a1a;
  --surface:     #242424;
  --surface2:    #2e2e2e;
  --border:      rgba(255,255,255,0.08);
  --text:        #f5f0e8;
  --muted:       #9a9080;
  --white:       #ffffff;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --shadow:      0 8px 32px rgba(0,0,0,0.5);
  --font-head:   'Cormorant Garamond', Georgia, serif;
  --font-body:   'Jost', system-ui, sans-serif;
  --transition:  0.18s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--charcoal);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- App wrapper ---------- */
.app {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0 80px;
}

/* ---------- Header ---------- */
.maya-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.maya-logo__name {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 6px;
}
.maya-logo__address {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.pin-icon { width: 14px; height: 14px; flex-shrink: 0; color: var(--gold); }

/* ---------- Filter Bar ---------- */
.filter-bar {
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.filter-bar__inner {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
}
.filter-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}
.filter-pill:hover, .filter-pill:focus-visible {
  background: rgba(201, 168, 76, 0.08);
  outline: none;
}
.filter-pill:focus-visible { box-shadow: 0 0 0 2px var(--gold) inset; }
.filter-pill__label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-pill__value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 2px;
}
.filter-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ---------- Safety notice ---------- */
.safety-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.safety-dot { color: var(--gold); }

/* ---------- Slots Section ---------- */
.slots-section { padding: 8px 24px 0; }

.slots-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.slot-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  font-family: var(--font-body);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.slot-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
  border-radius: inherit;
}
.slot-btn:hover::after { background: rgba(255,255,255,0.07); }

/* Available slots → bold red like the screenshot */
.slot-btn--available {
  background: var(--slot-red);
  color: #fff;
}
.slot-btn--available:hover {
  background: var(--slot-red-h);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(224,32,32,0.4);
}
.slot-btn--available:active { transform: translateY(0); }

/* Unavailable / blocked */
.slot-btn--unavailable, .slot-btn--blocked {
  background: var(--surface2);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}
.slot-btn--unavailable::after, .slot-btn--blocked::after { display: none; }

/* Hidden (past time today) */
.slot-btn--hidden { display: none; }

.slot-time {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.1;
}
.slot-label {
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 3px;
  letter-spacing: 0.03em;
}

.slots-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Request Row ---------- */
.request-row {
  display: flex;
  justify-content: center;
  padding: 24px 24px 0;
}
.btn-request {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 36px;
  border-radius: 50px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  letter-spacing: 0.03em;
}
.btn-request:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.05);
}

/* ---------- Other Dates ---------- */
.other-dates {
  margin: 32px 24px 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.other-dates__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
}
.other-dates__title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.other-dates__toggle {
  background: none; border: none; cursor: pointer;
  color: var(--muted); display: flex; align-items: center;
  transition: transform var(--transition), color var(--transition);
  padding: 4px;
}
.other-dates__toggle[aria-expanded="false"] { transform: rotate(180deg); }
.other-dates__toggle:hover { color: var(--gold); }
.other-dates__toggle svg { width: 20px; height: 20px; }

.other-dates__body {
  padding: 0 24px 20px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.other-dates__body.collapsed { display: none; }

.other-date-row { margin-bottom: 20px; }
.other-date-row:last-child { margin-bottom: 0; }
.other-date-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 10px;
  display: block;
}
.other-date-slots {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) transparent;
}
.other-date-slots::-webkit-scrollbar { height: 4px; }
.other-date-slots::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 2px; }

.other-slot-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.15);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  white-space: nowrap;
  text-align: center;
  min-width: 90px;
}
.other-slot-btn:hover {
  border-color: var(--slot-red);
  background: rgba(224,32,32,0.08);
  transform: translateY(-1px);
}
.other-slot-label { font-size: 0.7rem; color: var(--muted); display: block; margin-top: 2px; }

/* ---------- Dropdowns ---------- */
.dropdown {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 820px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 24px 32px;
  z-index: 300;
  animation: slideUp 0.25s ease;
  box-shadow: var(--shadow);
}
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}
.dropdown__title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 20px;
  text-align: center;
}

/* Guests grid */
.guests-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.guest-num-btn {
  display: flex; align-items: center; justify-content: center;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--charcoal);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.guest-num-btn:hover { border-color: var(--gold); color: var(--gold); }
.guest-num-btn.active {
  background: var(--slot-red);
  border-color: var(--slot-red);
  color: #fff;
}

/* Calendar */
.calendar { margin-bottom: 20px; }
.calendar-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.cal-nav-btn {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); transition: all var(--transition);
}
.cal-nav-btn:hover { border-color: var(--gold); color: var(--gold); }
.cal-nav-btn svg { width: 16px; height: 16px; }
.cal-month-label { font-family: var(--font-head); font-size: 1.1rem; font-weight: 500; color: var(--gold); }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; margin-bottom: 8px;
}
.cal-weekdays span { font-size: 0.72rem; color: var(--muted); font-weight: 500; letter-spacing: 0.05em; padding: 4px 0; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text);
  transition: all var(--transition);
  font-family: var(--font-body);
}
.cal-day:hover:not(.cal-day--disabled) { background: rgba(201,168,76,0.12); }
.cal-day.selected { background: var(--slot-red); color: #fff; }
.cal-day--today:not(.selected) { border: 1.5px solid var(--gold); color: var(--gold); }
.cal-day--disabled { color: var(--surface2); cursor: not-allowed; pointer-events: none; }
.cal-day--empty { pointer-events: none; }

/* Time filter */
.time-filter-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.time-filter-btn {
  padding: 14px 20px;
  background: var(--charcoal);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}
.time-filter-btn:hover { border-color: var(--gold); }
.time-filter-btn.active { background: var(--slot-red); border-color: var(--slot-red); color: #fff; }

.btn-dropdown-close {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--charcoal);
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  letter-spacing: 0.03em;
}
.btn-dropdown-close:hover { background: var(--gold-light); }

/* ---------- Overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal__inner {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow);
  animation: scaleIn 0.22s ease;
}
@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted);
  transition: all var(--transition);
}
.modal__close:hover { color: var(--text); border-color: var(--gold); }
.modal__close svg { width: 18px; height: 18px; }
.modal__title {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.modal__slot-info {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.slot-info-pill {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.slot-info-pill.highlight { background: var(--slot-red); border-color: var(--slot-red); color: #fff; }

/* Form */
.booking-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 12px; }
.form-row--2 > * { flex: 1; }
.form-group { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.form-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-input {
  background: var(--charcoal);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}
.form-input::placeholder { color: var(--muted); }
.form-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.12); }
.form-textarea { resize: vertical; min-height: 80px; }

.form-error {
  background: rgba(224,32,32,0.12);
  border: 1px solid rgba(224,32,32,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #ff7070;
  font-size: 0.88rem;
}

.btn-gold-full {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  color: var(--charcoal);
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-top: 4px;
}
.btn-gold-full:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.3);
}
.btn-gold-full:active { transform: none; }
.btn-gold-full:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none;
}

/* Success screen */
.booking-success { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 20px 0 10px; }
.success-icon { color: var(--gold); }
.success-icon svg { width: 60px; height: 60px; }
.success-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.success-msg { color: var(--muted); font-size: 0.95rem; text-align: center; }
.success-details {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  width: 100%;
  display: flex; flex-direction: column; gap: 8px;
}
.success-detail-row { display: flex; justify-content: space-between; font-size: 0.88rem; }
.success-detail-row span:first-child { color: var(--muted); }
.success-detail-row span:last-child { font-weight: 500; color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 540px) {
  .slots-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-pill { padding: 10px 12px; }
  .filter-pill__value { font-size: 0.85rem; }
  .modal__inner { padding: 24px 20px; }
  .form-row--2 { flex-direction: column; }
  .guests-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 360px) {
  .slots-grid { grid-template-columns: repeat(2, 1fr); }
}
