/* Root styles */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #64748b;
  --success-color: #16a34a;
  --warning-color: #ea580c;
  --border-color: #e2e8f0;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* Form Section */
.form-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Checkbox Group */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
}

.checkbox input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
  cursor: pointer;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  width: 100%;
  margin-top: 1rem;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
  margin-right: 0.5rem;
}

.btn-secondary:hover {
  background-color: #475569;
  box-shadow: var(--shadow);
}

/* Itinerary Section */
.itinerary-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.itinerary-section.hidden {
  display: none;
}

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

.itinerary-header h2 {
  font-size: 1.8rem;
  color: var(--text-dark);
}

.itinerary-actions {
  display: flex;
  gap: 0.5rem;
}

/* Fallback message */
.fallback-message {
  background-color: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  color: #92400e;
}

.fallback-message.hidden {
  display: none;
}

/* Itinerary Content */
.itinerary-content {
  margin-bottom: 2rem;
}

.day-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s;
}

.day-card:hover {
  box-shadow: var(--shadow);
}

.day-header {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.activity-slot {
  background: var(--bg-white);
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.activity-slot:last-child {
  margin-bottom: 0;
}

.activity-slot-type {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.activity-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.activity-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.activity-cost {
  color: var(--success-color);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Cost Summary */
.cost-summary {
  background: var(--bg-light);
  border-top: 2px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: 2rem;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.cost-summary.hidden {
  display: none;
}

.cost-value {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .header h1 {
    font-size: 2rem;
  }

  .form-section,
  .itinerary-section {
    padding: 1.5rem;
  }

  .checkbox-group {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .itinerary-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .itinerary-actions {
    width: 100%;
  }

  .btn-secondary {
    flex: 1;
    margin-right: 0;
  }

  .btn-secondary:not(:last-child) {
    margin-right: 0.5rem;
  }
}

/* Print Styles */
@media print {
  body {
    background-color: white;
  }

  .form-section {
    display: none;
  }

  .itinerary-section {
    box-shadow: none;
    border: none;
  }

  .itinerary-actions {
    display: none;
  }

  .day-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--border-color);
  }

  .container {
    max-width: 100%;
  }
}
