@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --sky: #0EA5E9;
  --sky-light: #E0F2FE;
  --sky-mid: #BAE6FD;
  --sky-dark: #0284C7;
  --purple: #7C3AED;
  --white: #FFFFFF;
  --bg: #F0F7FF;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-muted: #64748B;
  --border: rgba(14, 165, 233, 0.15);
  --shadow-sm: 0 2px 8px rgba(14, 165, 233, 0.12);
  --shadow-md: 0 6px 24px rgba(14, 165, 233, 0.16);
  --shadow-lg: 0 16px 48px rgba(14, 165, 233, 0.2);
  --radius: 28px;
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: -0.01em;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ── LIGHT MESH BACKGROUND ── */
#mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, #F0F7FF 0%, #E0F2FE 50%, #F8FAFF 100%);
  overflow: hidden;
}

#mesh-bg::before,
#mesh-bg::after,
#mesh-bg .blob3 {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: meshMove 20s ease-in-out infinite alternate;
}

#mesh-bg::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #BAE6FD 0%, transparent 70%);
  top: -120px;
  left: -120px;
}

#mesh-bg::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #DDD6FE 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
  animation-delay: -8s;
}

#mesh-bg .blob3 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #BAE6FD 0%, transparent 70%);
  top: 40%;
  left: 30%;
  animation-delay: -14s;
}

@keyframes meshMove {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(40px, -50px) scale(1.08);
  }

  66% {
    transform: translate(-30px, 40px) scale(0.96);
  }

  100% {
    transform: translate(50px, 20px) scale(1.04);
  }
}

/* ── APP WRAPPER ── */
#app {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── SCREENS ── */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  transition: opacity 0.4s var(--transition), transform 0.4s var(--transition);
  opacity: 0;
  transform: translateX(20px);
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateX(0);
}

.screen.exit {
  opacity: 0;
  transform: translateX(-20px);
}

/* ── FAVOURITES SCREEN ── */
#favourites-screen {
  background: var(--bg);
}

/* ── SCROLLABLE CONTENT ── */
.scroll-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 120px;
  -webkit-overflow-scrolling: touch;
}

.scroll-content::-webkit-scrollbar {
  display: none;
}

/* ── HEADER ── */
.app-header {
  padding: 56px 24px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.header-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}

.header-title span {
  color: var(--sky-dark);
}

.header-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 400;
}

/* ── HEADER INSTALL BUTTON ── */
#header-install-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.4);
  transition: transform 0.2s var(--transition), box-shadow 0.2s var(--transition);
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}

#header-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(14, 165, 233, 0.5);
}

#header-install-btn:active {
  transform: scale(0.95);
}

/* ── SECTION TITLES ── */
.section-header {
  padding: 0 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-link {
  font-size: 13px;
  color: var(--sky);
  font-weight: 600;
  cursor: pointer;
}

/* ── HORIZONTAL SCROLLER ── */
.h-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 24px 12px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.h-scroll::-webkit-scrollbar {
  display: none;
}

/* ── TRIP CARDS ── */
.trip-card {
  flex-shrink: 0;
  width: 240px;
  height: 155px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.25s var(--transition), box-shadow 0.25s var(--transition);
  background: var(--sky-light);
  box-shadow: var(--shadow-sm);
}

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

.trip-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

.trip-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--transition);
}

.trip-card:hover img {
  transform: scale(1.05);
}

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

.trip-card-body {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
}

.trip-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.trip-card-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}

.trip-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

/* ── HEART SAVE BUTTON ON TRIP CARD ── */
.card-fav-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--transition);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.card-fav-btn.saved {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.card-fav-btn:active {
  transform: scale(0.88);
}

/* ── SHIMMER ── */
.shimmer {
  background: linear-gradient(90deg, var(--sky-light) 25%, var(--sky-mid) 50%, var(--sky-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0
  }

  100% {
    background-position: -200% 0
  }
}

.skeleton-card {
  flex-shrink: 0;
  width: 240px;
  height: 155px;
  border-radius: var(--radius);
}

/* ── FEATURED CARD ── */
.featured-card {
  margin: 0 24px 20px;
  height: 190px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--transition), box-shadow 0.25s var(--transition);
}

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

.featured-card:active {
  transform: scale(0.98);
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-card .trip-card-overlay {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.55), rgba(0, 0, 0, 0.4));
}

.featured-card-inner {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.featured-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 5px;
}

.featured-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.featured-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 3px;
}

/* ── STATS ROW ── */
.stats-row {
  display: flex;
  gap: 12px;
  margin: 0 24px 24px;
}

.stat-card {
  flex: 1;
  background: var(--white);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--sky-dark);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ── BOTTOM NAV ── */
#bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 382px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 30px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 16px;
  transition: all 0.2s var(--transition);
  color: var(--text-muted);
  position: relative;
  background: transparent;
  border: none;
}

.nav-item.active {
  color: var(--sky-dark);
}

.nav-item.active .nav-bg {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(186, 230, 253, 0.25));
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  position: relative;
  z-index: 1;
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.nav-item:active {
  transform: scale(0.9);
}

/* ── FAB ── */
#fab {
  position: fixed;
  bottom: 29px;
  left: 50%;
  transform: translateX(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  border: none;
  cursor: pointer;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.5), 0 0 0 0 rgba(14, 165, 233, 0.3);
  animation: fabPulse 3s ease-in-out infinite;
  transition: box-shadow 0.2s var(--transition);
  color: #fff;
}

#fab:active {
  transform: translateX(-50%) scale(0.93);
  animation: none;
}

@keyframes fabPulse {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.5), 0 0 0 0 rgba(14, 165, 233, 0.3);
  }

  50% {
    box-shadow: 0 4px 28px rgba(14, 165, 233, 0.7), 0 0 0 14px rgba(14, 165, 233, 0);
  }
}

#fab svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

/* ── WHITE CARD ── */
.white-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ── BOTTOM SHEET ── */
#sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--transition);
}

#sheet-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  z-index: 201;
  padding: 0 24px 40px;
  transition: transform 0.45s var(--transition);
  max-height: 95vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(14, 165, 233, 0.18);
}

#bottom-sheet::-webkit-scrollbar {
  display: none;
}

#bottom-sheet.open {
  transform: translateX(-50%) translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--sky-mid);
  margin: 12px auto 24px;
}

.sheet-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 6px;
}

.sheet-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 26px;
}

/* ── STEP DOTS ── */
.step-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 26px;
}

.step-dot {
  height: 4px;
  border-radius: 2px;
  background: var(--sky-light);
  flex: 1;
  transition: all 0.3s var(--transition);
}

.step-dot.active {
  background: linear-gradient(90deg, var(--sky-dark), var(--sky));
}

.step-dot.done {
  background: var(--sky-mid);
}

/* ── SEARCH INPUT ── */
.search-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.search-input {
  width: 100%;
  padding: 15px 18px;
  background: var(--sky-light);
  border: 1.5px solid var(--sky-mid);
  border-radius: 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s var(--transition), background 0.2s var(--transition);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--sky);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

/* ── AUTOCOMPLETE ── */
#autocomplete {
  background: var(--white);
  border: 1.5px solid var(--sky-mid);
  border-radius: 18px;
  overflow: hidden;
  margin-top: 8px;
  display: none;
  box-shadow: var(--shadow-md);
}

.ac-item {
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
  font-weight: 500;
}

.ac-item:not(:last-child) {
  border-bottom: 1px solid var(--sky-light);
}

.ac-item:hover,
.ac-item:active {
  background: var(--sky-light);
}

.ac-flag {
  font-size: 22px;
}

.ac-text {
  color: var(--text);
  font-weight: 600;
}

.ac-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.ac-searching {
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── VIBE CHIPS ── */
.vibe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.btn-dice {
  background: var(--sky-light);
  border: 1.5px solid var(--sky-mid);
  border-radius: 12px;
  font-size: 20px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--transition);
}

.btn-dice:active {
  transform: scale(0.9);
  background: var(--sky-mid);
}

.btn-dice.spin {
  animation: diceSpin 0.5s ease-in-out infinite alternate;
  pointer-events: none;
  opacity: 0.7;
}

@keyframes diceSpin {
  to {
    transform: rotate(20deg) scale(1.1);
  }
}

.vibe-chip {
  padding: 14px 12px;
  border-radius: 18px;
  background: var(--sky-light);
  border: 1.5px solid var(--sky-mid);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.vibe-chip:active {
  transform: scale(0.95);
}

.vibe-chip.selected {
  border-color: var(--sky-dark);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(186, 230, 253, 0.3));
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.3), 0 4px 16px rgba(14, 165, 233, 0.2);
}

.vibe-emoji {
  font-size: 24px;
}

.vibe-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.vibe-chip.selected .vibe-label {
  color: var(--sky-dark);
}

/* ── DURATION SLIDER ── */
.slider-section {
  margin-bottom: 16px;
}

.day-count {
  font-size: 50px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--sky-dark);
  margin-bottom: 16px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.slider-label span {
  font-size: 13px;
  color: var(--text-muted);
}

.slider-track {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--sky-light);
  outline: none;
  cursor: pointer;
}

.slider-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.5);
  border: 3px solid #fff;
}

/* ── BUTTONS ── */
.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--sky-dark) 0%, var(--sky) 100%);
  border: none;
  border-radius: 16px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  margin-top: 20px;
  transition: transform 0.15s var(--transition), box-shadow 0.15s var(--transition);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.25);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  flex: 1;
  padding: 15px;
  background: var(--sky-light);
  border: 1.5px solid var(--sky-mid);
  border-radius: 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s var(--transition);
}

.btn-secondary:active {
  transform: scale(0.97);
  background: var(--sky-mid);
}

/* ── LOADING OVERLAY ── */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(240, 247, 255, 0.95);
  backdrop-filter: blur(20px);
}

#loading-overlay.show {
  display: flex;
}

.loading-spinner {
  width: 56px;
  height: 56px;
  margin-bottom: 28px;
  border-radius: 50%;
  position: relative;
}

.loading-spinner::before,
.loading-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}

.loading-spinner::before {
  border-top-color: var(--sky-dark);
  border-right-color: var(--sky-dark);
  animation: spin 1s linear infinite;
}

.loading-spinner::after {
  border-bottom-color: var(--sky);
  border-left-color: var(--sky);
  animation: spin 1.4s linear infinite reverse;
}

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

.loading-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 260px;
  line-height: 1.4;
  color: var(--sky-dark);
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

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

/* ── RESULT SCREEN ── */
#result-screen {
  background: var(--bg);
}

#map-container {
  height: 42vh;
  min-height: 280px;
  position: relative;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.15);
}

#map {
  width: 100%;
  height: 100%;
}

.map-back-btn {
  position: absolute;
  top: 52px;
  left: 14px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sky-dark);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--transition);
}

.map-back-btn:active {
  transform: scale(0.93);
}

/* ── Save to Favourites button (on result) ── */
.btn-save-itinerary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1.5px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.btn-save-itinerary.saved {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.btn-save-itinerary:active {
  transform: scale(0.95);
}

.map-fav-btn {
  position: absolute;
  top: 52px;
  right: 14px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--transition);
  font-size: 18px;
}

.map-fav-btn.saved {
  color: #ef4444;
  background: #fff0f0;
  border-color: #fca5a5;
}

.map-fav-btn:active {
  transform: scale(0.88);
}

.trip-header {
  padding: 18px 24px 10px;
}

.trip-header-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.trip-header-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.result-overview {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 8px 24px 0;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.06), rgba(186, 230, 253, 0.15));
  border-left: 3px solid var(--sky);
  border-radius: 0 12px 12px 0;
  display: none;
}

/* ── DAY TABS ── */
.day-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 24px 14px;
}

.day-tabs::-webkit-scrollbar {
  display: none;
}

.day-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--white);
  border: 1.5px solid var(--sky-mid);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--transition);
  font-family: 'Inter', sans-serif;
}

.day-tab.active {
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.4);
}

.day-tab:active {
  transform: scale(0.95);
}

/* ── ACTIVITY CARDS ── */
.itinerary-list {
  padding: 0 20px;
  padding-bottom: 40px;
}

.activity-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--transition);
  cursor: pointer;
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.activity-card:active {
  transform: scale(0.98);
}

.activity-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.activity-body {
  flex: 1;
  min-width: 0;
}

.activity-time {
  font-size: 10px;
  color: var(--sky);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.activity-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.5;
}

.activity-tip {
  font-size: 11px;
  color: var(--sky-dark);
  margin-top: 5px;
  font-weight: 500;
  background: rgba(14, 165, 233, 0.08);
  border-radius: 8px;
  padding: 4px 8px;
  display: inline-block;
}

.activity-type {
  display: inline-block;
  padding: 2px 9px;
  background: var(--sky-light);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--sky-dark);
  margin-top: 6px;
}

.directions-btn {
  padding: 7px 11px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
  transition: all 0.15s var(--transition);
  font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}

.directions-btn:active {
  transform: scale(0.93);
}

/* ── TRAVEL CONNECTOR ── */
.travel-connector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 14px;
  margin-bottom: 10px;
}

.connector-line {
  flex: 1;
  height: 1px;
  background: var(--sky-light);
}

.connector-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

/* ── DAY THEME TAG ── */
.day-theme-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(186, 230, 253, 0.2));
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 20px;
  display: inline-block;
  padding: 5px 14px;
  color: var(--sky-dark);
}

/* ── CUSTOM MAP MARKER ── */
.custom-marker {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  border: 2.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.5);
}

/* ── LEAFLET OVERRIDES (LIGHT) ── */
.leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.97) !important;
  border: 1.5px solid var(--sky-mid) !important;
  border-radius: 14px !important;
  color: var(--text) !important;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25) !important;
}

.leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.97) !important;
}

.leaflet-popup-content {
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  color: var(--text) !important;
}

.leaflet-control-zoom {
  border: none !important;
}

.leaflet-control-zoom a {
  background: rgba(255, 255, 255, 0.95) !important;
  color: var(--sky-dark) !important;
  border: 1px solid var(--sky-mid) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* ── TOAST ── */
#toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0F172A;
  color: #fff;
  padding: 12px 24px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: all 0.3s var(--transition);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── ADD TRIP PROMPT ── */
.add-trip-prompt {
  margin: 0 24px 20px;
  height: 100px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed var(--sky-mid);
  cursor: pointer;
  color: var(--sky);
  transition: all 0.2s var(--transition);
  background: rgba(14, 165, 233, 0.03);
}

.add-trip-prompt:hover {
  background: var(--sky-light);
  border-color: var(--sky);
}

.add-trip-prompt:active {
  transform: scale(0.98);
}

.add-trip-prompt svg {
  width: 22px;
  height: 22px;
}

.add-trip-prompt span {
  font-size: 14px;
  font-weight: 600;
}

/* ── FAVOURITES ── */
.fav-card {
  margin: 0 24px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s var(--transition);
  display: flex;
  align-items: center;
  gap: 0;
}

.fav-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.fav-card:active {
  transform: scale(0.98);
}

.fav-card-info {
  flex: 1;
  padding: 14px 16px;
}

.fav-card-city {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.fav-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.fav-card-vibes {
  font-size: 11px;
  color: var(--sky-dark);
  font-weight: 600;
  margin-top: 4px;
}

.fav-card-del {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  margin-right: 14px;
  transition: all 0.15s var(--transition);
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

.fav-card-del:active {
  transform: scale(0.85);
  background: rgba(239, 68, 68, 0.18);
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
  line-height: 1.6;
}

/* ── PWA INSTALL BANNER ── */
#pwa-banner {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: calc(100% - 40px);
  max-width: 390px;
  background: var(--white);
  border: 1.5px solid var(--sky-mid);
  border-radius: 20px;
  padding: 14px 18px;
  display: none;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 150;
  animation: slideUp 0.4s var(--transition);
}

#pwa-banner.show {
  display: flex;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(30px);
    opacity: 0
  }

  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1
  }
}

.pwa-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.pwa-info {
  flex: 1;
  min-width: 0;
}

.pwa-info strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.pwa-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.pwa-install-btn {
  padding: 9px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--sky-dark), var(--sky));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.pwa-install-btn:active {
  transform: scale(0.95);
}

.pwa-close-btn {
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}

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

/* ── TRIP SUMMARY CARD ── */
.trip-summary-card {
  background: linear-gradient(135deg, var(--sky-light), rgba(186, 230, 253, 0.3));
  border: 1.5px solid var(--sky-mid);
  border-radius: 18px;
  padding: 16px;
  margin-top: 10px;
}

.trip-summary-label {
  font-size: 11px;
  color: var(--sky-dark);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.trip-summary-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.trip-summary-item {}

.trip-summary-item .s-label {
  font-size: 11px;
  color: var(--text-muted);
}

.trip-summary-item .s-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}