/* styles.css — Voyageur Travel Companion */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #4A647E;
  --primary-hover: #3A5168;
  --secondary: #72859B;
  --secondary-light: #E8ECF1;
  --bg: #F1EFEC;
  --surface: #FFFFFF;
  --border: #C4BBB4;
  --text: #1A1E24;
  --text-muted: #676C7F;
  --radius: 16px;
  --radius-sm: 8px;

  /* Accent palette */
  --accent-morning: #F8731E;
  --accent-afternoon: #F9A44F;
  --accent-evening: #618C76;
  --accent-red: #F94143;
  --accent-orange: #F35E2C;
  --accent-peach: #F9734A;
  --accent-green: #9EA76D;
  --accent-teal: #607C7B;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

/* ── Cloud Background ──────────────────────────── */
.cloud-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.cloud-canvas.active {
  opacity: 1;
}

/* ── Animations ────────────────────────────────── */
.fade-in {
  animation: playful-fade-in 0.4s ease forwards;
}

.slide-in-right {
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Selectable Row / Cards ────────────────────── */
.selection-row {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background-color: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 14px;
}

.selection-row:hover {
  border-color: var(--secondary);
  background-color: #FDFBFA;
}

.selection-row.selected {
  border-color: #F8731E;
  background-color: #F8731E0C;
  box-shadow: 0 0 0 1.5px #F8731E;
}

/* ── Chips ─────────────────────────────────────── */
.chip {
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 9999px;
  border: 2px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--secondary);
  background-color: #FDFBFA;
}

.chip.selected {
  background: linear-gradient(135deg, #F8731E, #F35E2C);
  border-color: #F8731E;
  color: var(--surface);
}

/* ── Card base (applied via CSS, not Tailwind) ── */
.v-card {
  background: #FFFFFF;
  border: 2px solid #C4BBB4;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
}

.trip-card:hover {
  border-color: var(--trip-accent, var(--primary));
}

/* Time block containers */
.v-time-block-container {
  background: var(--bg);
  border: 2px solid #C4BBB4;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 768px) {
  .v-time-block-container { padding: 28px; gap: 20px; }
}

/* ── Drag & Drop ───────────────────────────────── */
.activity-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  cursor: grab;
}

.activity-card:active { cursor: grabbing; }

.activity-card.dragging {
  opacity: 0.5;
  transform: scale(0.97);
}

.time-block {
  min-height: 100px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  border: 2px solid transparent;
  border-radius: 12px;
}

.time-block.drag-over {
  background-color: rgba(160, 83, 61, 0.04);
  border-color: var(--primary);
  border-style: dashed;
}

/* ── Custom Scrollbar ──────────────────────────── */
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9999px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* ── Dialog animation ──────────────────────────── */
dialog[open] {
  animation: playful-rise-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Sidebar overlay transition ───────────────── */
#sidebar-overlay {
  backdrop-filter: blur(2px);
}

/* ── Map header background ─────────────────────── */
.map-header {
  background-image:
    linear-gradient(to bottom, rgba(241, 239, 236, 0.35), rgba(241, 239, 236, 1)),
    url('/images/map-bg.webp');
  background-size: cover;
  background-position: center;
}

/* ── Packing List ─────────────────────────────── */
.packing-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: white;
  border: 1.5px solid transparent;
}

.packing-item:hover {
  background: #FDFBFA;
  border-color: var(--border);
}

.packing-item.checked {
  opacity: 0.6;
}

.packing-item.checked .packing-item-label {
  text-decoration: line-through;
  color: var(--text-muted);
}

.packing-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.packing-item.checked .packing-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.packing-delete-btn {
  margin-left: auto;
  padding: 4px;
  border-radius: 6px;
  color: var(--text-muted);
  opacity: 0;
  transition: all 0.2s ease;
}

.packing-item:hover .packing-delete-btn {
  opacity: 1;
}

.packing-delete-btn:hover {
  color: #ef4444;
  background: #fef2f2;
}

/* ── Notes ────────────────────────────────────── */
#notes-textarea {
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.8;
}

/* ── Map Day Tabs ────────────────────────────── */
.map-day-tab {
  padding: 8px 18px;
  border-radius: 9999px;
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.map-day-tab:hover {
  border-color: var(--secondary);
  background: #FDFBFA;
}

.map-day-tab.active {
  background: #618C76;
  border-color: #618C76;
  color: white;
}

/* ── Map Numbered Markers (drop-pin shape) ───── */
.map-numbered-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  color: white;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border: 3px solid white;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  line-height: 1;
}

.map-numbered-marker span {
  transform: rotate(45deg);
  display: block;
}

/* ── Leaflet Popup Overrides ─────────────────── */
.leaflet-popup-content-wrapper {
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.leaflet-popup-tip {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.v-map-popup {
  min-width: 200px;
}

.v-map-popup-accent {
  height: 4px;
  width: 100%;
}

.v-map-popup-body {
  padding: 14px 16px;
}

.v-map-popup-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  color: #1A1A1A;
  margin-bottom: 4px;
}

.v-map-popup-time {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #4A647E;
  background: #E8ECF1;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.v-map-popup-desc {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

.v-map-popup-block-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.6;
  margin-bottom: 2px;
}

/* ── Map Activity Sidebar Items ──────────────── */
.map-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.map-activity-item:hover {
  background: var(--bg);
  border-color: var(--border);
}

.map-activity-number-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.map-activity-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.map-activity-connector {
  width: 2px;
  flex: 1;
  min-height: 12px;
  border-radius: 1px;
  opacity: 0.3;
}

/* Block header dividers in activity sidebar */
.map-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.map-block-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── More Menu ────────────────────────────────── */
#mobile-more-menu {
  animation: playful-rise-in 0.2s ease both;
}
