﻿/* ==========================================================================
   OVATION MUSIC HOUSE — MUSIC CLASS BOOKING SYSTEM STYLES
   Extends the core design system. Uses all existing CSS variables.
   Does NOT override any existing styles.
   ========================================================================== */

/* ----- BOOKING PAGE HERO ----- */
.booking-hero {
  padding-top: 10rem;
  padding-bottom: 5rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(11, 25, 44, 0.97) 100%),
              url('../images/grand_piano.jpg') center/cover no-repeat;
  text-align: center;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

/* ----- BOOKING PAGE LAYOUT ----- */
.booking-page-section {
  background: var(--color-navy-dark);
  padding-top: 4rem;
  padding-bottom: 6rem;
}

.booking-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
}

/* ----- STEP INDICATOR ----- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  flex: 1;
}

.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  border: 2px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: all 0.35s ease;
  position: relative;
  z-index: 2;
}

.step-label {
  font-size: 0.72rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  transition: color 0.35s ease;
  white-space: nowrap;
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(212, 175, 55, 0.15);
  margin-top: -1.65rem;
  transition: background 0.35s ease;
}

.step-item.active .step-circle {
  background: var(--color-gold-primary);
  border-color: var(--color-gold-primary);
  color: var(--color-navy-dark);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.45);
}

.step-item.active .step-label { color: var(--color-gold-primary); }

.step-item.completed .step-circle {
  background: rgba(74, 222, 128, 0.15);
  border-color: #4ADE80;
  color: #4ADE80;
}

.step-item.completed .step-label { color: #4ADE80; }
.step-line.completed { background: rgba(74, 222, 128, 0.4); }

/* ----- BOOKING FORM PANEL ----- */
.booking-form-panel {
  background: var(--color-navy-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.booking-step { display: none; }
.booking-step.active { display: block; }

.booking-section-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-gold-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

/* ----- INSTRUMENT GRID ----- */
.instrument-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.instrument-card {
  background: rgba(11, 25, 44, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem 0.5rem;
  cursor: pointer;
  transition: all 0.28s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.instrument-card:hover {
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.instrument-card.selected {
  border-color: var(--color-gold-primary);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.instrument-card.selected::after {
  content: 'v';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.6rem;
  color: var(--color-gold-primary);
  font-weight: 900;
  font-family: var(--font-heading);
}

.instrument-emoji {
  font-size: 1.7rem;
  line-height: 1;
}

.instrument-name {
  font-family: var(--font-heading);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.3;
  transition: color 0.28s ease;
}

.instrument-card.selected .instrument-name { color: var(--color-gold-primary); }

/* ----- FREQUENCY SELECTOR ----- */
.frequency-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.frequency-option {
  background: rgba(11, 25, 44, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: all 0.28s ease;
  text-align: center;
  user-select: none;
}

.frequency-option:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

.frequency-option.selected {
  border-color: var(--color-gold-primary);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.frequency-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-gold-primary);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.frequency-label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.frequency-option.selected .frequency-label { color: var(--color-gold-primary); }

/* ----- DAY SELECTOR ----- */
.days-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.day-checkbox-item { display: none; }

.day-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  background: rgba(11, 25, 44, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
  user-select: none;
}

.day-checkbox-label:hover:not(.disabled-day) {
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--color-text-subtle);
}

.day-checkbox-item:checked + .day-checkbox-label {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--color-gold-primary);
  color: var(--color-gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

.day-checkbox-label.disabled-day {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.days-help-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-style: italic;
}

/* ----- DURATION OPTIONS ----- */
.duration-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.duration-option {
  background: rgba(11, 25, 44, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: all 0.28s ease;
  text-align: center;
  user-select: none;
}

.duration-option:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

.duration-option.selected {
  border-color: var(--color-gold-primary);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.duration-time {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-gold-primary);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.duration-label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.duration-price {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-white);
  background: rgba(212, 175, 55, 0.08);
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.duration-option.selected .duration-price {
  background: rgba(212, 175, 55, 0.22);
  color: var(--color-gold-primary);
}

/* ----- TIME SLOT GRID ----- */
.time-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.time-slot-btn {
  background: rgba(11, 25, 44, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.4rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
  text-align: center;
}

.time-slot-btn:hover {
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--color-text-subtle);
  transform: translateY(-1px);
}

.time-slot-btn.selected {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--color-gold-primary);
  color: var(--color-gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.time-slots-note {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

/* ----- CLASS TYPE SELECTOR ----- */
.class-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.class-type-option {
  background: rgba(11, 25, 44, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.28s ease;
  text-align: center;
  user-select: none;
}

.class-type-option:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

.class-type-option.selected {
  border-color: var(--color-gold-primary);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.class-type-icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }

.class-type-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-subtle);
  margin-bottom: 0.35rem;
  transition: color 0.28s ease;
}

.class-type-option.selected .class-type-name { color: var(--color-gold-primary); }

.class-type-desc {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ----- ADDRESS FIELD (CONDITIONAL) ----- */
.address-field-container { display: none; margin-bottom: 1.5rem; }

.address-field-container.visible {
  display: block;
  animation: fadeSlideDown 0.35s ease;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- BOOKING FORM INPUTS ----- */
.booking-form-group { margin-bottom: 1.25rem; }

.booking-form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-white);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.booking-form-label .required-star { color: #F87171; margin-left: 2px; }

.booking-input {
  width: 100%;
  background: rgba(11, 25, 44, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-white);
  outline: none;
  transition: all 0.25s ease;
}

.booking-input:focus {
  border-color: var(--color-gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.booking-input.error {
  border-color: #F87171;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.2);
}

.booking-input::placeholder { color: var(--color-text-muted); }

.field-error-msg {
  font-size: 0.78rem;
  color: #F87171;
  margin-top: 0.35rem;
  display: none;
}

.field-error-msg.visible { display: block; }

/* ----- STEP NAVIGATION BUTTONS ----- */
.booking-nav-btns {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.booking-nav-btns .btn { flex: 1; }

/* ----- BOOKING SUMMARY PANEL ----- */
.booking-summary-panel {
  position: sticky;
  top: 110px;
}

.booking-summary-card {
  background: var(--color-navy-card);
  border: 1px solid var(--color-gold-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card), 0 0 25px rgba(212, 175, 55, 0.08);
}

.summary-header {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-gold-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-row:last-of-type { border-bottom: none; }

.summary-key {
  font-size: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.summary-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-white);
  text-align: right;
}

.summary-val.gold { color: var(--color-gold-primary); }
.summary-placeholder { font-size: 0.78rem; color: var(--color-text-muted); font-style: italic; opacity: 0.6; }

.summary-price-box {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
}

.summary-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.summary-price-row:last-child {
  margin-bottom: 0;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.summary-price-label {
  font-size: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
}

.summary-price-amount {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-gold-primary);
}

.summary-weekly-amount {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--color-gold-primary);
}

/* ----- VALIDATION ERROR BANNER ----- */
.booking-error-banner {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #FCA5A5;
  display: none;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
}

.booking-error-banner.visible { display: flex; }

/* ----- BOOKING CONFIRMATION SCREEN ----- */
.booking-confirmation { display: none; text-align: center; padding: 3rem 2rem; }
.booking-confirmation.visible { display: block; }

.confirmation-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.1);
  border: 2px solid #4ADE80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem auto;
  animation: confirmPulse 1.2s ease-out;
}

@keyframes confirmPulse {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.confirmation-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-text-white);
  margin-bottom: 0.75rem;
}

.confirmation-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-subtle);
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.booking-reference-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1.5px solid var(--color-gold-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: inline-block;
  min-width: 300px;
}

.booking-ref-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.booking-ref-code {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-gold-primary);
  letter-spacing: 3px;
  word-break: break-all;
}

.confirmation-details-grid {
  background: var(--color-navy-card);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: left;
  margin-bottom: 2rem;
}

.confirmation-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 1rem;
}

.confirmation-detail-row:last-child { border-bottom: none; }

.conf-key {
  font-family: var(--font-heading);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.conf-val {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-text-white);
  text-align: right;
}

.conf-val.gold { color: var(--color-gold-primary); }
.conf-val.green { color: #4ADE80; }

.confirmation-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----- SPINNER ----- */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(11, 25, 44, 0.3);
  border-top-color: var(--color-navy-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.4rem;
}

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

/* ----- ADMIN TAB EXTENSIONS ----- */
.admin-tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  background: var(--color-navy-card);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  width: fit-content;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: calc(var(--radius-md) - 4px);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-tab-btn:hover { color: var(--color-text-white); }

.admin-tab-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--color-gold-primary);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }

.status-confirmed { background: rgba(59, 130, 246, 0.2); color: #60A5FA; border: 1px solid #60A5FA; }
.status-cancelled { background: rgba(248, 113, 113, 0.2); color: #F87171; border: 1px solid #F87171; }

/* ----- RESPONSIVE ----- */
@media (max-width: 1100px) {
  .booking-layout { grid-template-columns: 1fr 330px; gap: 2rem; }
}

@media (max-width: 900px) {
  .booking-layout { grid-template-columns: 1fr; }
  .booking-summary-panel { position: static; order: -1; }
}

@media (max-width: 680px) {
  .booking-form-panel { padding: 1.75rem 1.25rem; }
  .instrument-grid { grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }
  .time-slot-grid { grid-template-columns: repeat(3, 1fr); }
  .days-selector-grid { grid-template-columns: repeat(2, 1fr); }
  .step-label { display: none; }
}

@media (max-width: 420px) {
  .instrument-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .instrument-card { padding: 0.75rem 0.25rem; }
  .instrument-emoji { font-size: 1.4rem; }
  .time-slot-grid { grid-template-columns: repeat(2, 1fr); }
  .booking-reference-box { min-width: auto; width: 100%; }
  .booking-ref-code { font-size: 1.15rem; letter-spacing: 1.5px; }
}

@media (max-width: 580px) {
  .admin-tab-bar { width: 100%; }
  .admin-tab-btn { flex: 1; justify-content: center; padding: 0.65rem 0.5rem; font-size: 0.72rem; }
}
