/* Premium Design System for Travel Itinerary Planner */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #ffffff;
  --accent-primary: #1a73e8; /* Google Blue */
  --accent-secondary: #9333ea; /* Purple */
  --accent-success: #137333; /* Green */
  --accent-warning: #e37400; /* Yellow */
  --text-main: #3c4043;
  --text-muted: #5f6368;
  --text-bright: #202124;
  --border-color: #dadce0;
  --border-focus: #1a73e8;
  --glass-glow: rgba(26, 115, 232, 0.08);
  
  --font-sans: 'Outfit', 'Roboto', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3);
  --shadow-md: 0 1px 3px 1px rgba(60,64,67,0.15);
  --shadow-lg: 0 4px 16px 0 rgba(60,64,67,0.15);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

header {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.015em;
}

.logo span {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-muted);
  -webkit-text-fill-color: initial;
}

main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* Wizard / Step indicator style */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto 3rem auto;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--bg-tertiary);
  z-index: 1;
  transform: translateY(-50%);
}

.wizard-progress {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  z-index: 2;
  transform: translateY(-50%);
  transition: width 0.4s ease;
  width: 0%;
}

.step-node {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  z-index: 3;
  transition: var(--transition);
}

.step-node.active {
  border-color: var(--accent-primary);
  color: var(--text-bright);
  box-shadow: 0 0 15px var(--glass-glow);
  background: var(--bg-secondary);
}

.step-node.completed {
  border-color: var(--accent-success);
  background: var(--accent-success);
  color: #0b0f19;
}

.step-node span {
  position: absolute;
  top: 3rem;
  font-size: 0.75rem;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-muted);
}

.step-node.active span {
  color: var(--text-bright);
  font-weight: 600;
}

/* Form Container Card */
.glass-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0.8;
}

/* Hero Screen styling */
.hero-screen {
  text-align: center;
  padding: 2rem 0;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text-bright);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.6;
}

/* Form Panel structure */
.wizard-panel {
  display: none;
}

.wizard-panel.active {
  display: block;
  animation: fadeIn 0.4s ease-out forwards;
}

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

h2.panel-title {
  font-family: var(--font-sans);
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-bright);
}

p.panel-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* Inputs & Form Groups */
.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.input-glow {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-bright);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  transition: var(--transition);
}

.input-glow:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(26, 115, 232, 0.2);
  background: var(--bg-tertiary);
}

/* Grids for Choice Selection */
.destination-grid, .selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.choice-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.choice-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  background: #f1f3f4;
  box-shadow: var(--shadow-md);
}

.choice-card.selected {
  border-color: var(--accent-primary);
  background: rgba(26, 115, 232, 0.08);
  box-shadow: 0 0 10px rgba(26, 115, 232, 0.1);
}

.choice-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
}

.choice-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.choice-card input[type="radio"],
.choice-card input[type="checkbox"] {
  position: absolute;
  top: 10px;
  right: 10px;
  accent-color: var(--accent-primary);
}

/* Custom experience quiz layout */
.dynamic-quiz-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quiz-question-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
}

.quiz-question-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-bright);
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.quiz-option-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-option-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-focus);
}

.quiz-option-item input {
  accent-color: var(--accent-primary);
  width: 1.1rem;
  height: 1.1rem;
}

.quiz-option-label {
  font-size: 0.95rem;
  user-select: none;
}

/* Wizard Navigation Row */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Button aesthetics */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--text-bright);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-bright);
}

.btn-success {
  background: var(--accent-success);
  color: #0b0f19;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

/* Results / Itinerary Dashboard */
.itinerary-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .itinerary-dashboard {
    grid-template-columns: 320px 1fr;
  }
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sticky-panel {
  position: sticky;
  top: 90px;
}

.summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.summary-card h3 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-bright);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.summary-meta-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.summary-meta-item span:first-child {
  color: var(--text-muted);
}

.summary-meta-item span:last-child {
  font-weight: 600;
  color: var(--text-main);
}

.summary-tagline {
  font-style: italic;
  color: var(--accent-secondary);
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Travel Recommendations Cards */
.reco-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.reco-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.reco-card.flights::before { background: var(--accent-primary); }
.reco-card.hotels::before { background: var(--accent-secondary); }
.reco-card.transport::before { background: var(--accent-warning); }

.reco-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.reco-header h4 {
  font-size: 1.1rem;
  color: var(--text-bright);
  font-weight: 700;
}

.reco-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
}

.reco-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.reco-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.reco-item-main {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.reco-item-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.regenerate-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.25rem 0;
}

.regenerate-btn:hover {
  color: var(--accent-secondary);
}

/* Main Timeline / Itinerary Days */
.itinerary-days-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.itinerary-day-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2rem;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.day-title {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  color: var(--text-bright);
}

.day-theme {
  font-size: 0.9rem;
  color: var(--accent-secondary);
  font-weight: 500;
}

.timeline-slots {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

.timeline-slot {
  display: flex;
  gap: 1.5rem;
  position: relative;
}

.timeline-time {
  width: 70px;
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 700;
  text-align: right;
  padding-top: 0.25rem;
}

.timeline-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  margin-top: 0.45rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 8px var(--accent-primary);
}

.timeline-slot::after {
  content: '';
  position: absolute;
  left: 81px;
  top: 1.2rem;
  bottom: -1.5rem;
  width: 2px;
  background: var(--bg-tertiary);
  z-index: 1;
}

.timeline-slot:last-child::after {
  display: none;
}

.timeline-content {
  flex: 1;
  background: var(--bg-tertiary);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  border-left: 3px solid var(--accent-primary);
}

.timeline-content.culture { border-left-color: var(--accent-primary); }
.timeline-content.adventure { border-left-color: var(--accent-secondary); }
.timeline-content.relaxing { border-left-color: var(--accent-success); }
.timeline-content.food { border-left-color: var(--accent-warning); }

.timeline-activity-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
}

.timeline-activity-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Dashboard Actions */
.dashboard-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

/* Modals & Loading Overlays */
.modal-overlay, .loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out forwards;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.loading-content {
  text-align: center;
  max-width: 450px;
  padding: 2rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(99, 102, 241, 0.1);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Autocomplete dropdown positioning */
.autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.autocomplete-item {
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  color: var(--text-bright);
  font-size: 0.95rem;
  transition: var(--transition);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--bg-secondary);
  color: var(--accent-primary);
}

/* Print/Export Styles override */
@media print {
  body {
    background: #ffffff !important;
    color: #111827 !important;
    background-image: none !important;
  }
  
  header, .wizard-steps, .wizard-nav, .dashboard-actions, .regenerate-btn {
    display: none !important;
  }
  
  main {
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  .itinerary-dashboard {
    display: block !important;
  }
  
  .sticky-panel {
    position: static !important;
  }
  
  .summary-card, .reco-card, .itinerary-day-card, .timeline-content {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #111827 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
  }
  
  .day-title, h3, h4, .timeline-activity-title {
    color: #111827 !important;
  }
  
  .timeline-time, .day-theme {
    color: #4b5563 !important;
  }
  
  .timeline-marker {
    background: #4b5563 !important;
    box-shadow: none !important;
  }
  
  .timeline-slot::after {
    background: #d1d5db !important;
  }
}

/* Activity Thumbnails */
.activity-thumbnail-wrapper {
  width: 90px;
  height: 65px;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: zoom-in;
  margin-top: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.activity-thumbnail-wrapper:hover,
.activity-thumbnail-wrapper:focus {
  width: 100%;
  height: 200px;
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.activity-thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.activity-thumbnail-wrapper:hover img,
.activity-thumbnail-wrapper:focus img {
  transform: scale(1.05);
}

/* Feedback Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.modal-content {
  width: 90%;
  max-width: 500px;
  animation: slideUp 0.3s ease;
}
.star {
  transition: color 0.2s;
}
.star:hover, .star.hovered, .star.active {
  color: #fbbf24 !important;
}
