/* Paris Journal — editorial travel aesthetic
   Palette: deep charcoal, warm cream, Parisian gold, dusty rose accent
   Typography: Playfair Display + Cormorant Garamond + DM Mono
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Cormorant+Garamond:wght@300;400;500&family=DM+Mono:wght@400;500&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --header-h:    52px;
  --panel-w:     300px;
  --bg:          #f5f0e8;
  --bg-panel:    #2a2d32;
  --bg-card:     #323640;
  --bg-input:    #3a3e48;
  --gold:        #60a5fa;
  --gold-light:  #93c5fd;
  --gold-dim:    #3b82f6;
  --cream:       rgba(255,255,255,0.88);
  --cream-dim:   rgba(255,255,255,0.55);
  --rose:        #60a5fa;
  --border:      rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.05);
  --text-main:   rgba(255,255,255,0.88);
  --text-muted:  rgba(255,255,255,0.45);
  --text-dim:    rgba(255,255,255,0.28);
  --font-nav:    'Inter', system-ui, sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text-main);
  font-family: 'Cormorant Garamond', Georgia, serif;
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: #1f2226;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
  gap: 1rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#header .wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#header .subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 2px;
}

#header .spacer { flex: 1; }

#header .photo-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ── Layout — map fills full screen ─────────────── */
#app {
  position: fixed;
  inset: 0;
}

/* ── Map ─────────────────────────────────────────── */
#map-container {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* ── Left panel — floats over map ───────────────── */
#timeline-panel {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--panel-w);
  background: #2a2d32;
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0,0,0,0.4);
}

#timeline-header {
  padding: 0.75rem 1rem 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1f2226;
}

#btn-view-all {
  font-family: var(--font-nav);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93c5fd;
  background: rgba(147,197,253,0.08);
  border: 0.5px solid rgba(147,197,253,0.2);
  border-radius: 3px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
#btn-view-all:hover { background: rgba(147,197,253,0.15); color: #bfdbfe; }

#timeline-header h2 {
  font-family: var(--font-nav);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

#timeline-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Chip strip ─────────────────────────────────── */
.chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem 0.55rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  background: #14213d;
}
.arr-chip {
  font-family: var(--font-nav);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.arr-chip:hover  { background: rgba(252,196,100,0.18); color: #fcc464; border-color: rgba(252,196,100,0.4); }
.arr-chip.active { background: #fcc464; color: #14213d; border-color: #fcc464; font-weight: 800; }

/* ── Location body ───────────────────────────────── */
.loc-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d4993a transparent;
  background: #1a2d50;
}
.loc-body::-webkit-scrollbar { width: 3px; }
.loc-body::-webkit-scrollbar-thumb { background: #d4993a; border-radius: 2px; }
.arr-panel        { display: none; }
.arr-panel.active { display: block; }
.arr-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #14213d;
  position: sticky;
  top: 0;
  z-index: 1;
}
.arr-panel-name {
  flex: 1;
  font-family: var(--font-nav);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fcc464;
}
.arr-panel-play {
  font-family: var(--font-nav);
  font-size: 0.58rem;
  font-weight: 600;
  color: #d4993a;
  background: rgba(252,196,100,0.1);
  border: 0.5px solid rgba(252,196,100,0.3);
  border-radius: 3px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.arr-panel-play:hover { background: rgba(252,196,100,0.22); color: #fcc464; }
.loc-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid rgba(252,196,100,0.5);
  background: transparent;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.loc-header:hover .loc-dot,
.loc-header.cluster-active .loc-dot { background: #fcc464; border-color: #fcc464; }

/* ── Chip strip ─────────────────────────────────── */
.chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem 0.55rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  background: #2a2d32;
}
.arr-chip {
  font-family: var(--font-nav);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.arr-chip:hover  { background: rgba(147,197,253,0.12); color: #93c5fd; border-color: rgba(147,197,253,0.3); }
.arr-chip.active { background: #60a5fa; color: #fff; border-color: #60a5fa; font-weight: 700; }

/* ── Location body ───────────────────────────────── */
.loc-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 transparent;
  background: #323640;
}
.loc-body::-webkit-scrollbar { width: 3px; }
.loc-body::-webkit-scrollbar-thumb { background: #3b82f6; border-radius: 2px; }
.arr-panel        { display: none; }
.arr-panel.active { display: block; }
.arr-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #2a2d32;
  position: sticky;
  top: 0;
  z-index: 1;
}
.arr-panel-name {
  flex: 1;
  font-family: var(--font-nav);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93c5fd;
}
.arr-panel-play {
  font-family: var(--font-nav);
  font-size: 0.58rem;
  font-weight: 500;
  color: #93c5fd;
  background: rgba(147,197,253,0.08);
  border: 0.5px solid rgba(147,197,253,0.2);
  border-radius: 3px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.arr-panel-play:hover { background: rgba(147,197,253,0.15); color: #bfdbfe; }
.loc-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid rgba(147,197,253,0.4);
  background: transparent;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.loc-header:hover .loc-dot,
.loc-header.cluster-active .loc-dot { background: #60a5fa; border-color: #60a5fa; }

/* ── Location block ──────────────────────────────── */
.loc-block { border-bottom: 1px solid var(--border-soft); }

.loc-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem 0.7rem 0.85rem;
  transition: background 0.15s;
  border-left: 2px solid transparent;
  user-select: none;
  cursor: pointer;
}

.loc-header:hover             { background: rgba(196,120,74,0.06); }
.loc-header.cluster-active,
.loc-header.photo-active      { background: rgba(196,120,74,0.1); border-left-color: var(--gold); }

/* Stacked thumbnail strip */
.loc-thumb-strip {
  position: relative;
  width: 52px;
  height: 44px;
  flex-shrink: 0;
}

.loc-thumb-strip img {
  position: absolute;
  width: 40px;
  height: 34px;
  object-fit: cover;
  border-radius: 3px;
  border: 1.5px solid var(--bg);
  background: var(--bg-card);
}

.loc-thumb-strip img:nth-child(1) { left: 8px; top: 6px; }
.loc-thumb-strip img:nth-child(2) { left: 4px; top: 3px; }
.loc-thumb-strip img:nth-child(3) { left: 0;   top: 0;   }

.loc-header-text { flex: 1; min-width: 0; }

.loc-name {
  font-family: var(--font-nav);
  font-size: 0.8rem;
  font-weight: 500;
  font-style: normal;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.loc-unlabelled .loc-name { color: var(--text-muted); font-style: italic; }

.loc-meta {
  font-family: var(--font-nav);
  font-size: 0.6rem;
  font-style: normal;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.loc-solo .loc-meta { color: var(--gold-dim); }

/* Slideshow icon */
.loc-slideshow-icon {
  font-size: 0.6rem;
  color: var(--gold-dim);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  padding: 0 0.1rem;
}

.loc-header:hover .loc-slideshow-icon { opacity: 1; }
.loc-header.cluster-active .loc-slideshow-icon { opacity: 1; color: var(--gold); }

/* Chevron */
.loc-chevron {
  font-size: 1rem;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform 0.2s;
  line-height: 1;
}
.loc-chevron.open { transform: rotate(90deg); }

/* ── Photo rows ──────────────────────────────────── */
.loc-rows {
  display: none;
  flex-direction: column;
  background: rgba(0,0,0,0.015);
  border-top: 1px solid var(--border-soft);
}
.loc-rows.open { display: flex; }

.loc-photo-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem 0.45rem 1.25rem;
  cursor: pointer;
  transition: background 0.12s;
  border-left: 2px solid transparent;
}

.loc-photo-row:hover          { background: rgba(196,120,74,0.05); }
.loc-photo-row.active         { background: rgba(196,120,74,0.1); border-left-color: var(--gold); }
.loc-photo-row.cluster-active { background: rgba(196,120,74,0.06); border-left-color: var(--gold-dim); }
.loc-photo-row.no-gps .loc-row-title { color: var(--text-muted); }

.loc-row-thumb {
  width: 48px;
  height: 40px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--bg-card);
  opacity: 0.75;
  transition: opacity 0.15s;
}

.loc-photo-row:hover .loc-row-thumb,
.loc-photo-row.active .loc-row-thumb { opacity: 1; }

.loc-row-text  { flex: 1; min-width: 0; }

.loc-row-title {
  font-family: var(--font-nav);
  font-size: 0.76rem;
  font-style: normal;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.loc-row-time {
  font-size: 0.58rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  font-family: 'DM Mono', monospace;
  margin-top: 2px;
}

.timeline-caption-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
  display: none;
}
.loc-photo-row.has-caption .timeline-caption-dot { display: block; }

.thumb-placeholder {
  width: 48px; height: 40px;
  background: var(--bg-card);
  border-radius: 2px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* ── Map ─────────────────────────────────────────── */
#map { width: 100%; height: 100%; }

.leaflet-container {
  background: #f5f5f5;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.leaflet-control-zoom a {
  background: #2a2d32 !important;
  color: rgba(255,255,255,0.8) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover {
  background: #323640 !important;
  color: #93c5fd !important;
}

.photo-marker { background: transparent !important; border: none !important; }
.pin-solo {
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
  transition: transform 0.15s;
  overflow: visible;
}
.pin-solo:hover, .pin-solo.active { transform: scale(1.25) translateY(-2px); }
.pin-cluster {
  cursor: pointer;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
  transition: transform 0.15s;
  overflow: visible;
}
.pin-cluster:hover, .pin-cluster.active { transform: scale(1.2) translateY(-2px); }

/* ── Slideshow overlay ───────────────────────────── */
#slideshow-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(20, 15, 10, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#slideshow-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Main image */
#slide-img-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 3rem 5rem 1rem;
  box-sizing: border-box;
}

#slide-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 8px 60px rgba(0,0,0,0.6);
  transition: opacity 0.18s ease;
}

#slide-img.fading { opacity: 0; }

/* ── Slide overlay caption ───────────────────────── */
.slide-overlay-caption {
  position: fixed;
  top: 0; bottom: 0; right: 0;
  width: 28%;
  padding: 5.5rem 1.5rem 2rem;
  background: rgba(8, 6, 18, 0.55);
  pointer-events: none;
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 2050;
}
.slide-overlay-caption::-webkit-scrollbar { display: none; }
.slide-overlay-caption.expanded {
  display: flex;
  pointer-events: auto;
}

.slide-overlay-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  color: rgba(245, 235, 215, 0.95);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.slide-overlay-location {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 0.85rem;
}

.slide-overlay-toggle {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.slide-overlay-toggle:hover { background: rgba(255,255,255,0.15); color: #fff; }
.slide-overlay-caption.expanded .slide-overlay-toggle { color: #fff; background: rgba(255,255,255,0.12); }




/* Prev / Next arrows */
#slide-prev, #slide-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 48px; height: 48px;
  color: rgba(240,230,210,0.8);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, opacity 0.15s;
  z-index: 10;
}

#slide-prev { left: 1.25rem; }
#slide-next { right: 1.25rem; }

#slide-prev:hover, #slide-next:hover { background: rgba(255,255,255,0.15); }

/* Close button */
/* Slideshow top-right controls row */
#slide-controls {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  z-index: 2100;
}

#slide-info {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  height: 36px;
  padding: 0 0.85rem;
  color: rgba(240,230,210,0.8);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}
#slide-info:hover  { background: rgba(255,255,255,0.15); color: #fff; }
#slide-info.active { background: rgba(196,120,74,0.3); border-color: var(--gold); color: var(--gold-light); }

#slide-close, #slide-fullscreen {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 36px; height: 36px;
  color: rgba(240,230,210,0.7);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  position: static;
}
#slide-close:hover,
#slide-fullscreen:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Footer: dots + counter */
#slide-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 2rem 1rem;
  flex-shrink: 0;
}

#slide-dots {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 80vw;
}

.slide-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.slide-dot:hover  { background: rgba(255,255,255,0.5); }
.slide-dot.active { background: var(--gold-light); transform: scale(1.3); }

#slide-counter {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: rgba(240,230,210,0.4);
  letter-spacing: 0.1em;
}

#slide-hint {
  font-size: 0.58rem;
  color: rgba(240,230,210,0.25);
  letter-spacing: 0.1em;
  padding-bottom: 0.5rem;
}


.slide-overlay-body {
  display: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 300;
  color: #ffffff;
  line-height: 1.75;
  white-space: pre-wrap;
}

.slide-overlay-caption.expanded .slide-overlay-body {
  display: block;
}

/* ── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

/* ── Toast ───────────────────────────────────────── */
#toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--bg-card); border: 1px solid var(--gold-dim);
  color: var(--gold-light); font-size: 0.68rem; letter-spacing: 0.08em;
  padding: 0.5rem 1.2rem; border-radius: 20px;
  z-index: 3000; opacity: 0; pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── Leaflet z-index ─────────────────────────────── */
.leaflet-bottom { z-index: 400 !important; }
.leaflet-popup  { z-index: 600 !important; }

.slide-overlay-body .source {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-style: normal;
}

.slide-overlay-body .source a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.slide-overlay-body .source a:hover {
  color: #fcc464;
}