/* ==========================================================================
   HELMONDSE STRATEN — Clean Light UI System (OpenStreetMap Style)
   Minimal · Sharp · Solid Helmond Red & Gold Heraldic Colors
   ========================================================================== */

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

/* ==========================================================================
   Design Tokens (Light Theme Default)
   ========================================================================== */
:root {
  /* Clean Light Surface Palette */
  --bg-void:         #f4f5f8;
  --bg-deep:         #e5e7eb;
  --bg-surface:      #ffffff;
  --bg-elevated:     #fafbfc;
  --bg-panel:        rgba(255, 255, 255, 0.95);
  --bg-glass:        rgba(255, 255, 255, 0.92);
  --bg-card:         rgba(255, 255, 255, 0.97);
  --bg-card-hover:   rgba(243, 244, 248, 0.98);

  /* Accent — Helmond Ridder Heraldic Red */
  --accent:          #e11d2e;
  --accent-dim:      #b91524;
  --accent-faint:    rgba(225, 29, 46, 0.1);
  --accent-border:   rgba(225, 29, 46, 0.25);

  /* Secondary Accent — Helmond Ridder Crown Gold */
  --accent2:         #d97706;
  --accent2-faint:   rgba(217, 119, 6, 0.1);
  --accent2-border:  rgba(217, 119, 6, 0.22);

  /* Text */
  --text-primary:    #111118;
  --text-secondary:  #4b5563;
  --text-muted:      #9ca3af;

  /* Borders */
  --border-default:  rgba(0, 0, 0, 0.08);
  --border-bright:   rgba(225, 29, 46, 0.32);
  --border-subtle:   rgba(0, 0, 0, 0.04);

  /* Shadows — crisp depth */
  --shadow-sm:       0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-md:       0 6px 18px rgba(0, 0, 0, 0.09);
  --shadow-lg:       0 14px 36px rgba(0, 0, 0, 0.12);
  --shadow-modal:    0 20px 50px rgba(0, 0, 0, 0.22);
  --shadow-accent:   0 4px 16px rgba(225, 29, 46, 0.22);

  /* Radii */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* Transitions */
  --t-fast:   0.14s ease;
  --t-mid:    0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px var(--glow-green-sm), 0 0 16px var(--glow-cyan-sm); }
  50%       { box-shadow: 0 0 20px var(--glow-green), 0 0 40px var(--glow-cyan); }
}

@keyframes scan-line {
  0%   { transform: translateY(-100%); opacity: 0; }
  20%  { opacity: 0.4; }
  80%  { opacity: 0.4; }
  100% { transform: translateY(400%); opacity: 0; }
}

@keyframes border-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Remove unused keyframes */
@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hud-appear {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.96); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ==========================================================================
   Base Reset
   ========================================================================== */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.55;
  transition: background var(--t-mid), color var(--t-mid);
}

#app {
  position: relative;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ==========================================================================
   MAP VIEWPORT
   ========================================================================== */
.map-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--bg-void);
}

/* ==========================================================================
   LEAFLET OVERRIDES
   ========================================================================== */
.leaflet-control-zoom {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-right: 20px !important;
  margin-bottom: 20px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leaflet-control-recenter {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  margin-right: 20px !important;
  margin-bottom: 6px !important;
}

.leaflet-control-zoom a,
.leaflet-control-recenter a.leaflet-control-recenter-btn {
  width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  font-size: 20px !important;
  border: none !important;
  border-radius: var(--r-md) !important;
  background: var(--bg-glass) !important;
  backdrop-filter: blur(20px) !important;
  color: var(--text-secondary) !important;
  text-shadow: none !important;
  box-shadow: 0 0 0 1px var(--border-default), var(--shadow-md) !important;
  transition: all var(--t-fast) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.leaflet-control-zoom a:hover,
.leaflet-control-recenter a.leaflet-control-recenter-btn:hover {
  background: var(--bg-surface) !important;
  color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--border-bright), var(--shadow-md) !important;
  transform: translateY(-1px);
}

/* Hide Leaflet Attribution */
.leaflet-control-attribution {
  display: none !important;
}

/* ==========================================================================
   TOP NAVIGATION — Premium Header Bar
   ========================================================================== */
.top-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  pointer-events: auto;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
  height: 68px;
  box-sizing: border-box;
}

/* Brand Section (Left) */
.nav-brand-card {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: default;
  flex-shrink: 0;
}

.brand-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.brand-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-faint);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: var(--r-full);
  border: 1px solid var(--accent-border);
}

/* Nav Actions (Right) */
.nav-actions {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Stats Pill Group */
.nav-pill-group {
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 6px;
  box-shadow: var(--shadow-md);
  gap: 2px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--r-lg);
  transition: all var(--t-fast);
}

.stat-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.stat-pill strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
}

.stat-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-pulse 2.2s ease-in-out infinite;
}

.stat-divider {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
}

/* Button: Icon Only */
.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--t-fast);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-icon:active {
  transform: translateY(0);
}

/* Button: Story / Text + Icon */
.btn-story {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--t-fast);
}

.btn-story:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  color: var(--accent);
}

/* Button: Back to Jens on the Bike */
.btn-jens-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: all var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn-jens-home:hover {
  background: var(--bg-card-hover);
  border-color: rgba(196, 83, 61, 0.45);
  color: #c4533d;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), 0 0 12px rgba(196, 83, 61, 0.15);
}

.jens-home-avatar {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid rgba(196, 83, 61, 0.35);
  flex-shrink: 0;
  display: block;
  transition: transform 0.2s ease, border-color 0.2s;
}

.btn-jens-home:hover .jens-home-avatar {
  transform: scale(1.08);
  border-color: #c4533d;
}

.jens-home-text {
  font-family: 'Syne', sans-serif;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

/* ==========================================================================
   HOVER HUD — Street Name Banner
   ========================================================================== */
.street-hover-hud {
  position: absolute;
  top: 82px;
  left: 50%;
  z-index: 1200;
  transform: translateX(-50%) translateY(-12px);
  opacity: 0;
  pointer-events: none;

  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 12px 22px;

  background: var(--bg-glass);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);

  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.hud-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hud-bottom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* No shimmer pseudo-element */

.street-hover-hud.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: hud-appear 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hud-street-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hud-wijk-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 3px 10px;
  border-radius: var(--r-full);
}

.hud-buurt-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 3px 10px;
  border-radius: var(--r-full);
}

.hud-click-hint {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   TOP BAR CENTER (Search + Filters + Kaartlagen)
   ========================================================================== */
.map-floating-panel {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  justify-content: center;
  max-width: 600px;
  min-width: 0;
  pointer-events: auto;
  animation: none;
}

.search-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 6px;
  background: var(--bg-glass);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--t-mid);
  flex: 1 1 200px;
  min-width: 130px;
  max-width: 270px;
}

.search-card:focus-within {
  border-color: var(--border-bright);
  box-shadow: 0 0 0 3px var(--accent-faint), var(--shadow-md);
}

.search-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--bg-card);
  color: var(--accent);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 6px 4px;
  caret-color: var(--accent);
}

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

.clear-search-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-md);
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}

.clear-search-btn.visible { display: flex; }
.clear-search-btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }

/* Filter Type Switcher (Wijken / Buurten) */
.filter-type-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2px;
}

.type-switch-btn {
  background: transparent;
  border: none;
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.type-switch-btn.active {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.type-switch-btn.active#tab-filter-wijken {
  color: #1d4ed8;
  font-weight: 700;
}

.type-switch-btn.active#tab-filter-buurten {
  color: #047857;
  font-weight: 700;
}

/* Filter Chips */
.quick-filter-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 350px;
  overflow-y: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.quick-filter-scroll::-webkit-scrollbar { display: none; }

.filter-chip {
  width: 100%;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.01em;
}

.filter-chip:hover {
  border-color: var(--border-bright);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.filter-chip.active {
  background: var(--accent-faint);
  color: var(--accent);
  border-color: var(--accent-border);
}

.filter-chip.chip-buurt.active {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.35);
}

.filter-chip .chip-count {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: var(--r-full);
  opacity: 0.75;
}

.filter-chip.active .chip-count {
  background: var(--accent-faint);
  color: var(--accent);
  opacity: 1;
}

.filter-chip.chip-buurt.active .chip-count {
  background: rgba(5, 150, 105, 0.15);
  color: #047857;
}

/* ==========================================================================
   DROPDOWN MENUS (Desktop)
   ========================================================================== */
.desktop-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--t-fast);
}

.desktop-dropdown-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
}

.desktop-dropdown-toggle.active {
  background: var(--accent-faint);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-dropdown-content, .layers-card {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 16px;
  z-index: 2000;
}

/* Modifier for layers dropdown which aligns right in nav-actions */
.layers-dropdown-container .layers-card {
  width: 280px;
}

.filter-dropdown-content.show, .layers-card.show {
  display: flex;
  animation: dropdown-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes dropdown-in {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MAP LAYERS / BOUNDARIES CONTROL (Now in Dropdown)
   ========================================================================== */
.map-layers-panel {
  position: static;
  display: flex;
  animation: none;
}



.layers-title {
  display: none; /* Hide title inside dropdown for desktop */
}

.layer-toggle-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.layer-btn {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.layer-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.layer-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-sm);
}

.layer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.35;
  transition: opacity var(--t-fast);
}

.layer-btn.active .layer-dot {
  opacity: 1;
}

.boundary-dot {
  background: #e11d2e;
  box-shadow: 0 0 6px rgba(225, 29, 46, 0.4);
}

.wijken-dot {
  background: #2563eb;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.4);
}

.buurten-dot {
  background: #059669;
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
}

/* Custom Map Labels for Wijken & Buurten (High contrast & on top) */
.map-wijk-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.map-wijk-label-inner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1.5px solid #2563eb;
  border-radius: var(--r-full);
  padding: 3px 9px;
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1e3a8a;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0,0,0,0.08);
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition: all var(--t-fast);
  user-select: none;
}

.map-wijk-label-inner:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: scale(1.06) translateY(-1px);
}

.map-buurt-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.map-buurt-label-inner {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #059669;
  border-radius: var(--r-full);
  padding: 2.5px 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #065f46;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition: all var(--t-fast);
  user-select: none;
}

.map-buurt-label-inner:hover {
  background: #059669;
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 5px 16px rgba(5, 150, 105, 0.45);
  transform: scale(1.06) translateY(-1px);
}

/* Pulsing highlight animation for hovered/active wijk polygon */
@keyframes area-pulse-glow {
  0% {
    stroke-width: 3.5px;
    stroke-opacity: 0.85;
    fill-opacity: 0.14;
  }
  50% {
    stroke-width: 5.5px;
    stroke-opacity: 1;
    fill-opacity: 0.28;
  }
  100% {
    stroke-width: 3.5px;
    stroke-opacity: 0.85;
    fill-opacity: 0.14;
  }
}

.wijk-pulsing-area {
  animation: area-pulse-glow 1.5s ease-in-out infinite !important;
  stroke: #1d4ed8 !important;
  fill: #2563eb !important;
}

/* Pulsing highlight animation for hovered/active buurt polygon */
@keyframes buurt-pulse-glow {
  0% {
    stroke-width: 3px;
    stroke-opacity: 0.85;
    fill-opacity: 0.14;
  }
  50% {
    stroke-width: 5px;
    stroke-opacity: 1;
    fill-opacity: 0.28;
  }
  100% {
    stroke-width: 3px;
    stroke-opacity: 0.85;
    fill-opacity: 0.14;
  }
}

.buurt-pulsing-area {
  animation: buurt-pulse-glow 1.5s ease-in-out infinite !important;
  stroke: #047857 !important;
  fill: #059669 !important;
}

/* ==========================================================================
   DRAWER TOGGLE BUTTON (Bottom Left)
   ========================================================================== */
.drawer-toggle-btn {
  position: absolute;
  bottom: 24px;
  left: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--t-mid);
  letter-spacing: 0.01em;
}

.drawer-toggle-btn:hover {
  border-color: var(--border-bright);
  color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* ==========================================================================
   SIDE DRAWER — Street List
   ========================================================================== */
.side-drawer {
  position: absolute;
  top: 82px;
  bottom: 24px;
  left: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  z-index: 998;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  background: var(--bg-glass);
  backdrop-filter: blur(28px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);

  transition: transform var(--t-spring), opacity var(--t-mid);
}

.side-drawer.hidden {
  transform: translateX(-370px);
  opacity: 0;
  pointer-events: none;
}

.drawer-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}

.drawer-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-count-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-faint);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 2px 9px;
  border-radius: var(--r-full);
}

.drawer-close {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
}

.drawer-close:hover {
  border-color: var(--border-bright);
  color: var(--accent);
  background: var(--bg-card-hover);
}

.street-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.street-list-container::-webkit-scrollbar { width: 4px; }
.street-list-container::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--r-full);
}

.street-item-card {
  padding: 14px 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--t-fast);
}

.street-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-default);
}

.street-item-card.active {
  background: var(--accent-faint);
  border-color: var(--accent-border);
}

.street-info { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }

.street-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.street-item-card.active .street-name { color: var(--accent); }

.street-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.street-tag {
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: var(--r-full);
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.empty-results {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* ==========================================================================
   VIDEO MODAL — Cinematic Showcase
   ========================================================================== */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 15, 29, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vw, 32px);
  opacity: 0;
  pointer-events: none !important;
}

.video-modal-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto !important;
}

.video-modal-card {
  width: min(96vw, calc((94vh - 70px) * (16 / 9)));
  max-width: min(1840px, 96vw);
  max-height: 96vh;
  background: var(--bg-panel);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border-default);
  border-top: 2px solid var(--accent);
  border-radius: var(--r-2xl);
  box-shadow: 0 24px 70px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(12px);
  transition: transform var(--t-spring);
  position: relative;
}

.video-modal-overlay.active .video-modal-card {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.video-modal-header {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
}

.modal-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.modal-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.modal-title-column {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.modal-street-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.modal-badge.wijk-badge {
  background: var(--accent-faint);
  color: var(--accent);
  border-color: var(--accent-border);
  font-weight: 700;
}

.modal-badge.buurt-badge {
  background: var(--accent2-faint);
  color: var(--accent2);
  border-color: var(--accent2-border);
}

.modal-badge.project-badge {
  background: rgba(124, 58, 237, 0.1);
  color: #a78bfa;
  border-color: rgba(124, 58, 237, 0.25);
}

.badge-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.8);
  animation: dot-pulse 1.8s ease-in-out infinite;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-modal-map {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #ffffff;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: all var(--t-fast);
  letter-spacing: 0.01em;
}

.btn-modal-map:hover {
  background: var(--accent-dim);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn-modal-map:active { transform: translateY(0); }

.modal-action-btn,
.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
}

.modal-action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-border);
  color: var(--accent);
}

.modal-close-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,80,80,0.4);
  color: #ff6060;
}

/* Video Stage */
.video-stage-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.street-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  outline: none;
  display: block;
}

/* ==========================================================================
   STORY / PROJECT INFO MODAL
   ========================================================================== */
.story-modal-card {
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  background: var(--bg-panel);
  backdrop-filter: blur(32px);
  border: 1px solid var(--border-default);
  border-top: 2px solid var(--accent);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-modal);
  position: relative;
  animation: slide-up 0.3s var(--t-spring) both;
}

.story-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--t-fast);
}

.story-modal-close:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 80, 80, 0.4);
  color: #ff6060;
  transform: scale(1.05);
}

.story-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.story-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-lg);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.story-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}

.story-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.story-body {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.story-body strong { color: var(--text-primary); }

.story-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 8px;
  letter-spacing: -0.02em;
}

.story-signature {
  margin-top: 0;
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.story-signature strong {
  color: var(--accent);
  font-size: 1.05rem;
  transition: color var(--t-fast);
}

.story-signature .signature-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--t-fast);
}

.story-signature-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  transition: transform var(--t-fast);
}

.story-signature-link:hover {
  transform: translateY(-1px);
}

.story-signature-link:hover strong {
  color: var(--accent-dim);
}

.story-signature-link:hover .signature-sub {
  color: var(--text-primary);
}

/* Modal Jens on the Bike Card Link */
.story-jens-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.story-jens-card-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  background: rgba(196, 83, 61, 0.08);
  border: 1px solid rgba(196, 83, 61, 0.25);
  border-radius: var(--r-lg);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--t-fast);
}

.story-jens-card-link:hover {
  background: rgba(196, 83, 61, 0.16);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(196, 83, 61, 0.2);
}

.story-jens-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(196, 83, 61, 0.4);
}

.story-jens-card-info {
  display: flex;
  flex-direction: column;
}

.story-jens-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

.story-jens-card-sub {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

.story-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 16px 12px;
  box-sizing: border-box;
  width: 100%;
}

.story-stat-card { 
  text-align: center; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.story-stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1.1;
  white-space: nowrap;
}

.story-stat-txt {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  white-space: nowrap;
}

.btn-story-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: all var(--t-fast);
  letter-spacing: 0.01em;
}

.btn-story-start:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}


/* ============================================================
   LEAFLET HOVER & SEARCH TOOLTIPS
   ============================================================ */
.leaflet-tooltip.street-hover-tooltip {
  background: #0f172a;
  border: 1.5px solid #d97706;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.4), 0 2px 8px rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--r-md);
  padding: 5px 12px;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000 !important;
  pointer-events: none !important;
  user-select: none !important;
  transform: translateY(-2px);
  transition: opacity var(--t-fast), transform var(--t-fast);
}

.leaflet-tooltip.street-hover-tooltip::before {
  border-top-color: #d97706;
}

/* Actieve Zoeklabel Badge op de kaart */
.leaflet-tooltip.street-search-active-tooltip {
  border-color: #ea580c;
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.55), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.leaflet-tooltip.street-search-active-tooltip::before {
  border-top-color: #ea580c;
}

.leaflet-tooltip.street-hover-tooltip:hover,
.leaflet-tooltip.street-search-active-tooltip:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
  transform: translateY(-4px) scale(1.04);
}

/* ============================================================
   BINGE & GAMIFICATION STYLES
   ============================================================ */
.btn-random-street {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--t-fast);
}

.btn-random-street svg {
  color: #f59e0b;
  transition: transform var(--t-fast);
}

.btn-random-street:hover {
  background: var(--bg-card-hover);
  border-color: #f59e0b;
  color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.btn-random-street:hover svg {
  transform: rotate(25deg) scale(1.15);
}

.stat-pill.watched-pill {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 6px 13px;
}

.stat-pill.watched-pill strong {
  color: #10b981;
}

.modal-nav-group {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-card);
  padding: 3px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-default);
}

.modal-nav-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: var(--r-full) !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.modal-nav-btn:hover {
  background: var(--bg-card-hover) !important;
  color: var(--accent) !important;
}

/* Toast Notification Banner */
.toast-notification {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  border: 1.5px solid var(--accent);
  color: #ffffff;
  padding: 11px 22px;
  border-radius: var(--r-full);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), 0 0 20px rgba(217, 119, 6, 0.35);
  font-family: 'Syne', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-notification .toast-icon {
  font-size: 1.1rem;
}

/* ============================================================
   RESPONSIVE TOP NAVIGATION (Laptops, Tablets & Desktops)
   ============================================================ */
@media (max-width: 1280px) {
  .brand-subtitle { display: none; }
  .stat-pill.watched-pill { padding: 6px 10px; }
  .stat-pill.watched-pill span { font-size: 0.75rem; }
  .top-nav { padding: 0 14px; gap: 8px; }
  .map-floating-panel { gap: 6px; }
}

@media (max-width: 1080px) {
  .btn-story span { display: none; }
  .btn-story { padding: 8px 12px; }
  .btn-random-street { padding: 6px 10px; font-size: 0.74rem; }
  .desktop-dropdown-toggle { padding: 7px 11px; font-size: 0.78rem; }
  .search-card { max-width: 190px; }
}

@media (max-width: 960px) {
  .btn-random-street span { display: none; }
  .btn-random-street { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: var(--r-md); }
  .stat-pill.watched-pill { padding: 5px 8px; font-size: 0.72rem; }
  .desktop-dropdown-toggle span { font-size: 0.76rem; }
}

/* ============================================================
   MOBILE RESPONSIVE — See css/mobile.css
   ============================================================ */
