/* MedallionVoyage - Premium Travel Portal Design System */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-rgb: 37, 99, 235;
  --accent: #4f46e5;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --warning: #f59e0b;

  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-dark: rgba(15, 23, 42, 0.45);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;

  --border-light: #e2e8f0;
  --border-focus: #93c5fd;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --font-main: 'Inter', sans-serif;
  --font-title: 'Outfit', sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2rem;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

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

html,
body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-primary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

.hidden {
  display: none !important;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(1rem);
  opacity: 0;
  animation: slideIn var(--transition-normal) forwards;
  pointer-events: auto;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

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

/* Global Modal System */
.global-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.global-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 450px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transform: scale(0.95);
  animation: modalScaleUp 0.2s ease forwards;
}

@keyframes modalScaleUp {
  to {
    transform: scale(1);
  }
}

.global-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.global-modal-header h3 {
  font-size: 1.25rem;
  font-family: var(--font-title);
  color: var(--text-primary);
  margin: 0;
}

.global-modal-body {
  padding: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.global-modal-footer {
  padding: 1rem 1.5rem;
  background: var(--bg-app);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Loader Screen */
.global-loader {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

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

/* Shared Buttons and Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  gap: 0.5rem;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.btn-secondary {
  background: var(--border-light);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-danger {
  background: var(--danger);
  color: var(--text-white);
}

.btn-danger:hover {
  background: var(--danger-hover);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Dropdown Menus */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 160px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.dropdown-menu.hidden {
  display: none;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg-app);
  color: var(--text-primary);
}

.dropdown-item.text-danger {
  color: var(--danger);
}

.dropdown-item.text-danger:hover {
  background: #fef2f2;
  color: var(--danger-hover);
}

.w-full {
  width: 100%;
}

/* Navigation Bar */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.animate-compass {
  color: var(--primary);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-3px) rotate(15deg);
  }
}

.nav-user-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-greeting {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Application Container spacing */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: calc(100vh - 120px);
  margin-top: 64px;
}

/* --- SECTION 1: AUTHENTICATION --- */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 160px);
  padding: 1.5rem 0;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: var(--text-white);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.auth-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.input-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.input-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-family: var(--font-main);
  font-size: 0.95rem;
  background: #f8fafc;
  transition: all var(--transition-fast);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- SECTION 2: DASHBOARD --- */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.dashboard-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.dashboard-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.trips-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-bottom: 3rem;
}

.year-group-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.year-group-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.trip-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.trip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.trip-card-cover {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.trip-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 60%);
}

.trip-card-days-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.trip-card-info {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.trip-card-dates {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.trip-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.trip-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.trip-card-actions {
  display: flex;
  justify-content: flex-end;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-light);
  margin-bottom: 3rem;
}

.empty-state i {
  font-size: 3.5rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: block;
}

.empty-state h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform var(--transition-fast);
}

.modal.open .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.btn-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-help {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  min-height: 140px;
}

.drop-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.drop-zone i {
  font-size: 2.2rem;
  color: var(--primary);
}

.drop-zone p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.textarea-code {
  width: 100%;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  resize: vertical;
  background: #f8fafc;
}

.textarea-code:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.modal-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* --- SECTION 3: TRIP DETAIL VIEW --- */
.detail-back-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.btn-icon-text {
  background: none;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.btn-icon-text:hover {
  color: var(--primary);
}

.trip-detail-header {
  position: relative;
  min-height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}

.header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.25) 100%);
  z-index: 1;
}

.header-content {
  position: relative;
  z-index: 2;
  color: var(--text-white);
}

.trip-dates-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.trip-title-heading {
  font-size: 2.25rem;
  color: var(--text-white);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.trip-desc-sub {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  font-weight: 300;
}

.itinerary-wrapper {
  margin-bottom: 4rem;
}

.section-title {
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: 1.5rem;
}

.divider {
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: 0.5rem 0 1rem 0;
}

.weather-notice {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Accordion Accordion Accordion */
.days-accordion {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.day-article {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-fast);
  scroll-margin-top: 80px;
}

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

.day-header {
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.day-header-cover {
  height: 130px;
  background-size: cover;
  background-position: center;
}

.day-header-meta {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.day-header-chevron {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  transition: transform var(--transition-normal);
}

.day-article.open .day-header-chevron {
  transform: rotate(180deg);
}

/* Weather Widget Row */
.day-weather-bar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
}

.weather-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.weather-desc-icon {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.weather-city-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.weather-desc-text {
  font-weight: 500;
  color: var(--text-secondary);
}

.weather-temps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.temp-max {
  font-weight: 700;
  color: var(--danger);
}

.temp-divider {
  color: var(--text-muted);
}

.temp-min {
  font-weight: 700;
  color: var(--primary);
}

.weather-rain-prob {
  margin-left: 0.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* Day body toggle height with transitions */
.day-body-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
  overflow: hidden;
}

.day-article.open .day-body-wrapper {
  grid-template-rows: 1fr;
}

.day-body-inner {
  min-height: 0;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.day-info-section {
  display: flex;
  flex-direction: column;
}

.day-title-text {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

/* Timeline Layout */
.timeline-list {
  display: flex;
  flex-direction: column;
  position: relative;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: var(--border-light);
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0.5rem;
}

.timeline-icon-node {
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.9rem;
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--border-light);
  z-index: 10;
}

.timeline-item.lodging .timeline-icon-node {
  background: #fffbeb;
  color: var(--warning);
}

.timeline-item.flight .timeline-icon-node {
  background: #f5f3ff;
  color: var(--accent);
}

.timeline-item.activity .timeline-icon-node {
  background: #ecfdf5;
  color: var(--success);
}

.timeline-content-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.timeline-content-left {
  flex-grow: 1;
}

.timeline-step-title {
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.timeline-step-title a:hover {
  text-decoration: underline;
}

.timeline-step-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.timeline-content-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.timeline-time-badge {
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.timeline-weather-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 0.22rem 0.5rem;
  border-radius: var(--radius-sm);
  gap: 0.25rem;
}

/* SPECIAL BOARDING PASS FLIGHT CARD DESIGN */
.flight-ticket-card {
  background: linear-gradient(135deg, #fbfbfb 0%, #f7f9fc 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 0.75rem;
  padding: 1.25rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}

/* Ticket cuts on left and right side */
.flight-ticket-card::before,
.flight-ticket-card::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  z-index: 5;
}

.flight-ticket-card::before {
  left: -8px;
}

.flight-ticket-card::after {
  right: -8px;
}

.ticket-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border-light);
}

.ticket-airline-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.ticket-airline-info i {
  color: var(--accent);
}

.ticket-flight-number {
  background: var(--accent);
  color: var(--text-white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.ticket-flight-path-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0.5rem;
}

.ticket-airport-node {
  text-align: center;
}

.airport-code {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.airport-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.ticket-flight-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  position: relative;
  padding: 0 1.5rem;
}

.arrow-line {
  height: 2px;
  background: var(--text-muted);
  width: 100%;
  position: relative;
}

.arrow-line::after {
  content: '\f072';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  background: #f8f9fc;
  padding: 0 0.5rem;
  color: var(--accent);
  font-size: 0.9rem;
}

.ticket-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  background: rgba(241, 245, 249, 0.5);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.ticket-meta-item {
  display: flex;
  flex-direction: column;
}

.ticket-meta-label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticket-meta-value {
  color: var(--text-primary);
  font-weight: 700;
  margin-top: 0.1rem;
}

/* Meals Section Styling */
.day-meals-section {
  background: #fafafb;
  border-top: 1px solid var(--border-light);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.meal-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meal-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.meal-label.lunch i {
  color: var(--warning);
}

.meal-label.dinner i {
  color: var(--accent);
}

.meal-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.meal-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.meal-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.02);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 3rem;
}
.btn-text-mobile {
  margin-left: 0.35rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dashboard-header .btn {
    width: 100%;
  }

  .trip-detail-header {
    min-height: 200px;
    padding: 1.5rem;
  }

  .trip-title-heading {
    font-size: 1.75rem;
  }

  .day-weather-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1.5rem;
    gap: 0.5rem;
  }

  .day-weather-bar .text-right {
    text-align: left;
    width: 100%;
  }

  .timeline-content-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .timeline-content-right {
    align-self: flex-end;
  }

  .ticket-flight-path-row {
    gap: 0.5rem;
  }

  .airport-code {
    font-size: 1.4rem;
  }
}

/* --- SECTION 4: ITINERARY BUILDER VIEW --- */
.builder-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn var(--transition-normal);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.builder-back-bar {
  display: flex;
  margin-bottom: 0.5rem;
}

.builder-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.builder-layout.chat-mode {
  grid-template-columns: 1fr;
}

.builder-layout.chat-mode .right-pane {
  display: none;
}

.builder-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pane-header h3 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pane-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Prompt Box Left Pane */
.prompt-box-container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.prompt-header {
  background: #f1f5f9;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.prompt-textarea {
  width: 100%;
  height: 400px;
  border: none;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  color: var(--text-secondary);
  resize: none;
  outline: none;
  line-height: 1.4;
}

/* Gemini Embedding Frame */
.iframe-container-wrapper {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-grow: 1;
  min-height: 400px;
}

.iframe-external-link-bar {
  background: #eff6ff;
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
}

.iframe-external-link-bar i {
  font-size: 1rem;
}

.iframe-frame-box {
  position: relative;
  width: 100%;
  flex-grow: 1;
  background: #ffffff;
  display: flex;
}

.gemini-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  z-index: 2;
}

.iframe-blocked-overlay {
  position: absolute;
  inset: 0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  z-index: 1;
}

.iframe-blocked-overlay p {
  max-width: 320px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Right Editor Pane */
.editor-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.editor-textarea {
  width: 100%;
  flex-grow: 1;
  min-height: 520px;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  padding: 1.25rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #0f172a;
  color: #e2e8f0;
  resize: none;
  line-height: 1.5;
}

.editor-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
}

.builder-actions-row {
  margin-top: auto;
}

/* Responsive Grid for builder */
@media (max-width: 1024px) {
  .builder-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .editor-textarea {
    min-height: 350px;
  }
}

/* Mobile specific for Builder Chat Mode */
@media (max-width: 768px) {
  .builder-section {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-bottom: -1.5rem;
  }
  
  .builder-back-bar {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .builder-layout.chat-mode .builder-pane.left-pane {
    padding: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-shadow: none;
    /* Make the chat fill the remaining viewport height */
    height: calc(100vh - 64px - 60px); /* 64px nav + 60px back bar */
    display: flex;
    flex-direction: column;
  }

  .builder-layout.chat-mode .pane-header {
    padding: 1rem 1.5rem 0 1.5rem;
  }

  .builder-layout.chat-mode #chat-interface {
    margin-top: 0 !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .builder-layout.chat-mode #chat-messages {
    flex-grow: 1;
    height: 0 !important; /* flex-grow will take over */
    overflow-y: auto;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  /* Snap the input at the bottom */
  .builder-layout.chat-mode #chat-interface > div:last-child {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    z-index: 10;
    padding: 1rem 1.5rem;
    background: white;
  }
}


/* Shared Itinerary Badge */
.trip-card-shared-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-white);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Trip Map */
.map-body-wrapper {
  padding: 0 !important;
}

#trip-map {
  width: 100%;
  height: 400px;
  background-color: #e2e8f0;
  z-index: 1; /* Keep map below navbar */
}

/* Pre-Trip Checklist */
.checklist-items-list {
  list-style: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.checklist-item:hover {
  border-color: var(--border-focus);
}

.checklist-item input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.checklist-item label {
  font-size: 0.95rem;
  color: var(--text-primary);
  flex-grow: 1;
  transition: color 0.2s, text-decoration 0.2s;
  cursor: pointer;
}

.checklist-item input[type="checkbox"]:checked + label {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Module Headers for Map and Checklist */
.module-header {
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  user-select: none;
  border-bottom: 1px solid var(--border-light);
}

.module-header-meta {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.module-header-chevron {
  position: absolute;
  right: 1.5rem;
  width: 2rem;
  height: 2rem;
  background: var(--bg-app);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.day-article.open .module-header-chevron {
  transform: rotate(180deg);
}

.trip-status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
}
.badge-done {
  background: rgba(30, 215, 96, 0.15);
  color: var(--success);
}
.badge-upcoming {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

/* Two-column layout for Day Cards on larger screens */
@media (min-width: 1024px) {
  .days-accordion {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 1.5rem;
  }
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Edit Mode Layout */
.edit-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .edit-layout {
    flex-direction: row;
  }
  .editor-container {
    flex: 2;
  }
  .location-assistant {
    flex: 1;
  }
}

.editor-container {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

/* Override jsoneditor border */
div.jsoneditor {
  border: none !important;
}

.location-assistant {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid var(--border-light);
}

.assistant-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.assistant-search {
  display: flex;
  gap: 0.5rem;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 500px;
  overflow-y: auto;
}

.loc-result-item {
  padding: 0.75rem;
  background: var(--bg-app);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.loc-result-item pre {
  background: #f1f5f9;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  overflow-x: auto;
  margin: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.loc-result-item pre:hover {
  background: #e2e8f0;
}

/* Visual Editor Specific Styles */
.visual-editor .editor-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.visual-editor h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.locations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.location-tag {
  display: flex;
  align-items: center;
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  gap: 0.5rem;
}

.loc-tag-info {
  display: flex;
  flex-direction: column;
}

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

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

.day-editor-title {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  flex: 1;
  width: 100%;
  align-items: end;
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-card-editor {
  background: var(--bg-app);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  position: relative;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.step-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.step-index {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}

.step-editor-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .step-editor-body {
    grid-template-columns: 1fr;
  }
  .step-editor-body .form-group {
    grid-column: 1 / -1 !important;
  }
  .section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .header-right, .header-left, .header-right .btn {
    width: 100%;
  }
  .day-editor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .day-editor-title {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .day-editor-title > * {
    width: 100% !important;
  }
}

.timeline-step-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.timeline-step-link:hover {
  text-decoration: underline;
}

.editor-container.visual-editor {
  background: var(--bg-body);
}

.visual-editor .form-control {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  padding: 0.75rem 1rem;
  background: var(--bg-app);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

/* Quill Editor Overrides */
.ql-toolbar.ql-snow {
  border-color: var(--border-light) !important;
  background: #f8fafc;
  border-radius: 4px 4px 0 0;
  padding: 8px !important;
}
.ql-container.ql-snow {
  border-color: var(--border-light) !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
}

/* Dashboard Map Styles */
.dashboard-map-wrapper.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: var(--bg-app);
  padding: 1.5rem !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box;
}

.dashboard-map-wrapper.fullscreen .dashboard-map-container {
  flex-grow: 1 !important;
  height: auto !important;
}

.dashboard-map-wrapper .map-legend {
  background: white;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #333;
}

/* Chat Markdown Styles */
.markdown-body p {
  margin-bottom: 0.5rem;
}
.markdown-body p:last-child {
  margin-bottom: 0;
}
.markdown-body ul, .markdown-body ol {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}
.markdown-body ul:last-child, .markdown-body ol:last-child {
  margin-bottom: 0;
}
.markdown-body strong {
  color: var(--text-primary);
}

/* Typing Indicator Animation */
.typing-dot {
  width: 8px;
  height: 8px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {
  0%, 80%, 100% { 
    transform: scale(0);
  } 40% { 
    transform: scale(1);
  }
}

/* Print Styles for PDF Generation */
@media print {
  @page { margin: 1cm; size: auto; }
  
  body, .app-container {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .main-nav, 
  .detail-back-bar,
  .toast-container,
  #global-modal-overlay,
  .module-header-chevron {
    display: none !important;
  }
  
  .trip-detail-section {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .day-article {
    page-break-inside: avoid;
    break-inside: avoid;
    border: 1px solid #ccc !important;
    margin-bottom: 1.5rem !important;
    box-shadow: none !important;
  }

  .module-header {
    background-color: #f1f5f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border-bottom: 1px solid #ccc !important;
  }

  .day-body {
    display: block !important;
  }
  
  .flight-ticket-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: #f8fafc !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* Prevent iOS auto-zoom when focusing inputs */
@media screen and (max-width: 768px) {
  input, textarea, select, .form-control, .prompt-textarea, .editor-textarea {
    font-size: 16px !important;
  }
}
/* Mobile Menu Styles */
.hidden-desktop {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .hidden-desktop {
    display: inline-flex !important;
  }
  
  .nav-container {
    flex-wrap: wrap;
  }

  .nav-user-controls {
    display: none;
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.5rem;
    background: var(--bg-card);
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
  }

  .nav-user-controls.open {
    display: flex !important;
  }
  
  .nav-user-controls .btn {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-user-controls .dropdown {
    width: 100%;
  }
  
  .nav-user-controls .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border-light);
    border-radius: 0;
    margin-left: 1rem;
  }
}

/* Settings Layout */
.settings-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
