/* ==========================================================================
   DESIGN SYSTEM VARIABLES & RESET
   ========================================================================== */
:root {
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Light Corporate Palette */
  --bg-main: #f4f6f9;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-card-selected: rgba(0, 47, 108, 0.05);
  
  --border-color: rgba(128, 130, 133, 0.2);
  --border-hover: rgba(0, 47, 108, 0.3);
  --border-active: rgba(0, 47, 108, 0.6);
  
  /* Vibrant Accents */
  --primary-glow: linear-gradient(135deg, #002F6C 0%, #00459e 100%);
  --primary-color: #002F6C;
  --secondary-color: #808285;
  --accent-teal: #002F6C;
  --accent-teal-glow: rgba(0, 47, 108, 0.1);
  
  /* Text */
  --text-main: #333333;
  --text-muted: #808285;
  --text-dark: #1a1a1a;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   AMBIENT BACKGROUND GLOWS
   ========================================================================== */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

.glow-1 {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.05) 70%);
  top: -10%;
  left: -10%;
}

.glow-2 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.2) 0%, rgba(99, 102, 241, 0.02) 75%);
  bottom: -15%;
  right: -5%;
}

/* ==========================================================================
   LAYOUT STRUCTURE (GLASSMORPHISM)
   ========================================================================== */
.app-container {
  display: grid;
  grid-template-columns: 400px 1fr;
  width: 94%;
  max-width: 1250px;
  min-height: 80vh;
  margin: 40px auto;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 1;
}

/* ==========================================================================
   SIDEBAR: EVENT DETAILS
   ========================================================================== */
.details-sidebar {
  padding: 48px 40px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  background: var(--primary-glow);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--primary-color);
}

.brand-text {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #ffffff 0%, #b5b5c9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.event-meta {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 20px;
  background: rgba(0, 47, 108, 0.1);
  border: 1px solid rgba(0, 47, 108, 0.2);
  color: var(--primary-color);
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 47, 108, 0.05);
}

.event-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #002F6C 0%, #1e5ab8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.event-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 36px;
}

.meta-item-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.meta-icon {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
}

.meta-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.price-text {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent-teal);
}

.sidebar-footer {
  margin-top: 40px;
  font-size: 0.75rem;
  color: var(--text-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 20px;
}

.sidebar-footer strong {
  color: var(--primary-color);
}

/* ==========================================================================
   RIGHT CONTENT PANEL: BOOKING WORKFLOW
   ========================================================================== */
.booking-portal {
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Custom scrollbars inside grid panels */
.booking-portal::-webkit-scrollbar {
  width: 6px;
}
.booking-portal::-webkit-scrollbar-track {
  background: transparent;
}
.booking-portal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.booking-portal::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Steps Framework */
.booking-step {
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 1;
  transition: opacity var(--transition-medium);
}

.booking-step.disabled {
  opacity: 0.25;
  pointer-events: none;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.step-number {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.9rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.step-header h2 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.timezone-display {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   DATE SELECTOR COMPONENT (HORIZONTAL SCROLL)
   ========================================================================== */
.date-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.date-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px;
  flex-grow: 1;
}

/* Hide default scrollbars for date list horizontal view */
.date-list::-webkit-scrollbar {
  display: none;
}
.date-list {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scroll-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.scroll-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.date-card {
  flex: 0 0 calc(14.28% - 11px);
  min-width: 72px;
  padding: 14px 10px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-medium);
  user-select: none;
}

.date-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.date-card.selected {
  background: var(--bg-card-selected);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.date-card .day-name {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.date-card.selected .day-name {
  color: #a5b4fc;
}

.date-card .day-number {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

/* ==========================================================================
   TIME SLOTS GRID COMPONENT
   ========================================================================== */
.slots-container {
  min-height: 80px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.time-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.time-slot:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.time-slot.selected {
  background: var(--primary-glow);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  color: #ffffff;
  transform: scale(1.02);
}

.slot-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
  transition: color var(--transition-fast);
}

.time-slot.selected .slot-count {
  color: rgba(255, 255, 255, 0.95);
}

.event-info-card {
  grid-column: 1 / -1;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
  text-align: center;
  animation: fade-in 0.3s ease-out;
}

.event-card-time {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.event-card-bookings {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-teal);
}

.empty-slots {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px 20px;
  text-align: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.05);
}

.empty-icon {
  width: 32px;
  height: 32px;
  color: var(--text-dark);
}

.empty-slots p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* SKELETON LOADER ANIMATION */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.skeleton-slot {
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   DETAILS FORM COMPONENT
   ========================================================================== */
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: #eef4fc; /* Light blue background */
  border: 1px solid rgba(0, 47, 108, 0.15);
  color: var(--primary-color);
  font-weight: 500;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #e2effa; /* Slightly darker light blue on focus */
  box-shadow: 0 0 10px rgba(0, 47, 108, 0.15);
}

.summary-box {
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.2);
  display: flex;
  align-items: center;
  animation: fade-in 0.3s ease-out;
}

.summary-highlight {
  font-weight: 700;
  color: var(--accent-teal);
}

.submit-btn {
  background: var(--primary-glow);
  color: #ffffff;
  border: none;
  padding: 18px 24px;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: all 0.6s ease;
}

.submit-btn:hover:not(:disabled)::before {
  left: 100%;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* Spinner */
.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   GLOBAL UTILITIES / HELPER CLASSES
   ========================================================================== */
.hidden {
  display: none !important;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & PHONES)
   ========================================================================== */
@media (max-width: 900px) {
  .app-container {
    grid-template-columns: 1fr;
    width: 95%;
    margin: 20px auto;
    border-radius: 16px;
  }
  
  .details-sidebar {
    padding: 36px 30px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .event-title {
    font-size: 1.8rem;
  }

  .booking-portal {
    padding: 36px 30px;
    gap: 30px;
  }
}

@media (max-width: 600px) {
  .details-sidebar,
  .booking-portal {
    padding: 24px 20px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .date-card {
    min-width: 65px;
    padding: 10px 6px;
  }
  
  .date-card .day-number {
    font-size: 1.2rem;
  }
}
