/* ========== TRAVEL PLANNER — CUSTOM STYLES ========== */

/* --- Loading screen --- */
#app-loading.fade-out { opacity: 0; pointer-events: none; }

/* --- Hero gradients --- */
.hero-gradient {
  background: linear-gradient(135deg, #0f766e 0%, #0ea5e9 50%, #f59e0b 100%);
}
.hero-gradient-dark {
  background: linear-gradient(135deg, #134e4a 0%, #0c4a6e 60%, #78350f 100%);
}
.hero-mesh {
  background:
    radial-gradient(at 20% 30%, rgba(14,165,233,0.3) 0%, transparent 50%),
    radial-gradient(at 80% 20%, rgba(245,158,11,0.25) 0%, transparent 50%),
    radial-gradient(at 50% 80%, rgba(13,148,136,0.3) 0%, transparent 50%),
    #134e4a;
}

/* --- Glass card --- */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8a29e; }

/* --- Day planner timeline --- */
.day-timeline {
  position: relative;
  padding-left: 2rem;
}
.day-timeline::before {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #14b8a6, #0ea5e9, #f59e0b);
  border-radius: 1px;
}
.day-dot {
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #14b8a6;
  background: white;
  z-index: 2;
}
.day-dot.active {
  background: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20,184,166,0.2);
}

/* --- Activity category badges --- */
.cat-sightseeing { background: #dbeafe; color: #1e40af; }
.cat-food { background: #fef3c7; color: #92400e; }
.cat-transport { background: #e0e7ff; color: #3730a3; }
.cat-accommodation { background: #fce7f3; color: #9d174d; }
.cat-activity { background: #d1fae5; color: #065f46; }
.cat-shopping { background: #fae8ff; color: #86198f; }
.cat-other { background: #f5f5f4; color: #57534e; }

/* --- Weather mini chart --- */
.weather-bar {
  transition: height 0.3s ease;
  border-radius: 3px 3px 0 0;
}

/* --- Destination card hover --- */
.dest-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.dest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* --- Tab indicator animation --- */
.tab-indicator {
  transition: left 0.25s ease, width 0.25s ease;
}

/* --- Packing checkbox --- */
.pack-check {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #d6d3d1;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
}
.pack-check:checked {
  background: #14b8a6;
  border-color: #14b8a6;
}
.pack-check:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* --- Drag states --- */
.drag-over {
  outline: 2px dashed #14b8a6;
  outline-offset: -2px;
  background: rgba(20,184,166,0.05) !important;
}
.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

/* --- Leaflet overrides --- */
.leaflet-container { border-radius: 12px; z-index: 1; }
.leaflet-control-zoom { border-radius: 8px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 32px !important; height: 32px !important; line-height: 32px !important; }

/* --- Budget bar --- */
.budget-bar {
  height: 8px;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* --- Smooth page transition --- */
.page-enter { animation: fadeSlideIn 0.3s ease; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Modal backdrop --- */
.modal-backdrop {
  background: rgba(28,25,23,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* --- Floating action button --- */
.fab {
  box-shadow: 0 4px 14px rgba(13,148,136,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13,148,136,0.5);
}

/* --- Pulse dot for "coming soon" --- */
.pulse-dot {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --- News card --- */
.news-card {
  transition: background 0.15s;
}
.news-card:hover {
  background: #fafaf9;
}

/* --- Input focus ring --- */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(13,148,136,0.3);
  border-color: #14b8a6;
}

/* --- Day shift circle buttons --- */
.day-shift-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid #d6d3d1;
  background: white;
  color: #78716c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.day-shift-btn:hover {
  border-color: #14b8a6;
  color: #0d9488;
  background: #f0fdfa;
  box-shadow: 0 2px 6px rgba(13,148,136,0.15);
  transform: scale(1.08);
}
.day-shift-btn:active { transform: scale(0.95); }

.day-shift-btn-sm {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid #e7e5e4;
  background: white;
  color: #a8a29e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
}
.day-shift-btn-sm.minus:hover {
  border-color: #fca5a5;
  color: #dc2626;
  background: #fef2f2;
}
.day-shift-btn-sm.plus:hover {
  border-color: #86efac;
  color: #16a34a;
  background: #f0fdf4;
}
.day-shift-btn-sm:active { transform: scale(0.9); }

/* --- Destination date row: one line on mobile, horizontal scroll if needed --- */
.dest-date-range-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  width: max-content;
  max-width: none;
}
.dest-date-range-row--detail {
  gap: 0.3rem 0.45rem;
}
.dest-date-range-row__arrow {
  color: #d6d3d1;
  font-weight: 600;
  font-size: 0.7rem;
  flex-shrink: 0;
  padding: 0 0.05rem;
  line-height: 1;
}
.dest-date-range-row--detail .dest-date-range-row__arrow {
  font-size: 0.8rem;
  color: #a8a29e;
}
.dest-date-range-scroll {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #e7e5e4 transparent;
  padding-bottom: 2px;
  margin-bottom: -2px;
}
.dest-date-range-scroll::-webkit-scrollbar {
  height: 3px;
}
.dest-date-range-scroll::-webkit-scrollbar-thumb {
  background: #e7e5e4;
  border-radius: 3px;
}
.dest-date-range-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* --- Destination date chips (subtle borders; weekend tint) --- */
.dest-date-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  padding: 0.12rem 0.38rem 0.14rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .dest-date-chip {
    font-size: 0.75rem;
    padding: 0.16rem 0.48rem 0.18rem;
    border-radius: 0.4375rem;
    gap: 0.32rem;
  }
}
.dest-date-chip__dow {
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
.dest-date-chip__date {
  font-weight: 500;
  color: #44403c;
}
.dest-date-chip--weekday {
  background: rgba(250, 250, 249, 0.95);
  border-color: #ebeae9;
  color: #57534e;
}
.dest-date-chip--weekday .dest-date-chip__dow {
  color: #78716c;
}
.dest-date-chip--weekend {
  background: rgba(245, 243, 255, 0.65);
  border-color: #e8e4f2;
  color: #5b21b6;
  box-shadow: none;
}
.dest-date-chip--weekend .dest-date-chip__dow {
  color: #6d28d9;
}
.dest-date-chip--weekend .dest-date-chip__date {
  color: #5b21b6;
}
.dest-weekend-note {
  max-width: 100%;
}

/* --- Flatpickr overrides --- */
.flatpickr-calendar { border-radius: 12px !important; box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important; border: 1px solid #e7e5e4 !important; font-family: 'Inter', system-ui, sans-serif !important; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: #0d9488 !important; border-color: #0d9488 !important; }
.flatpickr-day:hover { background: #ccfbf1 !important; border-color: #ccfbf1 !important; }
.flatpickr-day.today { border-color: #14b8a6 !important; }
.flatpickr-months .flatpickr-month { border-radius: 12px 12px 0 0; }
.flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 600; }
span.flatpickr-day.selected.startRange, span.flatpickr-day.selected.endRange { background: #0d9488 !important; }

/* --- Print-friendly --- */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
}
