/* === Dutch Pancake Reviews — Editorial Layout === */

:root {
  --butter:       #F5E6A3;
  --butter-light: #FFF8E1;
  --butter-dark:  #D4A843;
  --golden:       #C8943E;
  --cream:        #FFFDF5;
  --warm-brown:   #6B4226;
  --text:         #3E2A15;
  --text-light:   #7A6248;
  --white:        #FFFFFF;
  --shadow:       rgba(107, 66, 38, 0.12);
  --radius:       12px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* --- Layout --- */
.layout {
  display: flex;
  height: 100vh;
  padding: 24px;
  gap: 24px;
}

/* --- Map panel --- */
.map-panel {
  flex: 1;
  min-width: 0;
}

#map {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(107, 66, 38, 0.1);
  box-shadow: 0 4px 24px rgba(107, 66, 38, 0.08);
}

/* --- List panel --- */
.list-panel {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.list-header {
  padding: 8px 0 20px;
}

.list-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--warm-brown);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.list-mascot {
  height: 40px;
  width: auto;
  mix-blend-mode: multiply;
}

.list-subtitle {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: 0.3px;
  margin-top: 8px;
  line-height: 1.5;
}

.list-divider {
  height: 1px;
  background: var(--warm-brown);
  opacity: 0.2;
  margin-bottom: 20px;
}

/* --- Ranking list --- */
.ranking-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
}

.ranking-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(107, 66, 38, 0.08);
  cursor: pointer;
  transition: background 0.2s ease;
}

.ranking-item:hover {
  background: rgba(107, 66, 38, 0.04);
}

.ranking-item.active {
  background: var(--butter-light);
}

.ranking-number {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  min-width: 20px;
  font-variant-numeric: tabular-nums;
}

.ranking-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.ranking-score {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* --- Leaflet popup overrides --- */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius) !important;
  box-shadow: 0 8px 30px var(--shadow) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  min-width: 280px;
  max-width: 320px;
}

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

/* --- Popup card --- */
.popup-card {
  font-family: 'Inter', sans-serif;
}

.popup-header {
  background: linear-gradient(135deg, var(--butter) 0%, var(--butter-light) 100%);
  padding: 14px 18px;
  border-bottom: 1px solid var(--butter-dark);
}

.popup-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--warm-brown);
  margin-bottom: 3px;
}

.popup-header .address {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 400;
}

.popup-header .maps-link {
  display: inline-block;
  font-size: 11px;
  color: var(--warm-brown);
  text-decoration: none;
  font-weight: 500;
  margin-top: 6px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.popup-header .maps-link:hover {
  opacity: 1;
}

.popup-body {
  padding: 14px 18px;
  background: var(--white);
}

.popup-average {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0e8d8;
}

.popup-average .score {
  font-size: 28px;
  font-weight: 800;
  color: var(--golden);
  line-height: 1;
}

.popup-average .label {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.popup-ratings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.rating-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rating-row .name {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.rating-row .score {
  font-size: 14px;
  font-weight: 700;
  color: var(--golden);
  background: var(--butter-light);
  border-radius: 6px;
  padding: 2px 8px;
  min-width: 32px;
  text-align: center;
}

.popup-notes {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  padding-top: 12px;
  border-top: 1px solid #f0e8d8;
  font-style: italic;
}

/* --- Custom marker --- */
.pancake-marker {
  background: var(--butter);
  border: 2px solid var(--butter-dark);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 3px 10px var(--shadow);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.pancake-marker:hover {
  transform: scale(1.2);
}

/* --- Score color coding --- */
.score-high {
  color: #4a8c3f !important;
}

.score-mid {
  color: var(--golden) !important;
}

.score-low {
  color: #c0392b !important;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    overflow: hidden;
    height: 100vh;
  }

  body {
    height: 100vh;
    overflow: hidden;
  }

  .list-panel {
    width: 100%;
    max-height: 35vh;
    overflow-y: auto;
    flex-shrink: 0;
  }

  .list-header {
    padding: 4px 0 12px;
  }

  .list-header h1 {
    font-size: 26px;
  }

  .list-mascot {
    height: 32px;
  }

  .list-divider {
    margin-bottom: 12px;
  }

  .ranking-item {
    padding: 10px 4px;
  }

  .map-panel {
    flex: 1;
    min-height: 50vh;
  }

  #map {
    border-radius: 12px;
  }

  .leaflet-popup-content {
    min-width: 240px;
    max-width: 280px;
  }
}
