/* ============================================
   TRAUDIO - Reservation Wizard Styles
   Extends the main styles.css design system
   ============================================ */

/* === Progress Bar === */
.progress-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--card-border);
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.progress-step.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 20px var(--primary-glow);
}

.progress-step.completed {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: white;
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--card-border);
  transition: background 0.3s ease;
}

.progress-line.completed {
  background: var(--accent-green);
}

/* === Form Inputs === */
.wizard-input {
  box-sizing: border-box !important;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  color: var(--foreground);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  /* 16px strict to prevent iOS auto-zoom panning */
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.wizard-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Date and time inputs */
.wizard-input[type="date"],
.wizard-input[type="time"] {
  color-scheme: dark;
  box-sizing: border-box !important;
  max-width: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  display: block;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Textarea */
textarea.wizard-input {
  resize: vertical;
  min-height: 80px;
  white-space: normal;
}

/* === Form Labels === */
.wizard-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-dark);
  margin-bottom: 0.5rem;
}

/* === Step Transitions === */
.wizard-step {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Package Banner === */
.package-banner {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.package-banner .badge {
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-family: 'Space Grotesk', sans-serif;
}

/* === Upsell Cards === */
.upsell-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.upsell-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.upsell-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.upsell-feature-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.8;
}

.upsell-feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}

/* Highlight features that are exclusive to the upgrade */
.upsell-feature-list li.highlight {
  color: var(--foreground);
  font-weight: 500;
}

.upsell-feature-list li.highlight::before {
  color: var(--primary);
  content: '★';
}

/* === Summary Card === */
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
}

.summary-row .label {
  color: var(--muted);
  font-size: 0.875rem;
}

.summary-row .value {
  color: var(--foreground);
  font-weight: 500;
  font-size: 0.875rem;
  text-align: right;
}

.summary-divider {
  height: 1px;
  background: var(--card-border);
  margin: 0.5rem 0;
}

/* === Loading Spinner === */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* === Error Toast === */
.error-toast {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: #dc2626;
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  z-index: 100;
  animation: fadeInUp 0.3s ease;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.success-toast {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-green);
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  z-index: 100;
  animation: fadeInUp 0.3s ease;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}

/* === Google Maps Autocomplete Dark Theme === */
.pac-container {
  background: #12131a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.75rem !important;
  margin-top: 4px !important;
  font-family: 'Inter', sans-serif !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.pac-item {
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 0.75rem 1rem !important;
  color: #cbd5e1 !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
}

.pac-item:first-child {
  border-top: none !important;
}

.pac-item:hover {
  background: #1a1b25 !important;
}

.pac-item-query {
  color: #f1f5f9 !important;
  font-size: 0.875rem !important;
}

.pac-matched {
  color: #007cfb !important;
}

.pac-icon {
  filter: invert(1) opacity(0.5);
}

/* === Availability Animation === */
.pulse-ring {
  animation: pulseRing 1.5s ease-in-out infinite;
}

@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 var(--primary-glow-intense);
  }

  70% {
    box-shadow: 0 0 0 20px rgba(0, 124, 251, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 124, 251, 0);
  }
}

/* === Confirmation Page === */
.confirmation-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
}

/* === Responsive === */
@media (max-width: 640px) {
  .package-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .progress-step {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
}