/* ==========================================================================
   londonfoodlist — DESIGN SYSTEM
   Theme: Premium light editorial directory with split-screen map.
   Colors: Warm off-white background, obsidian text, royal purple accents.
   Typography: Syne (titles) + Inter (UI/body).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette — Light Theme */
  --bg-base: #FBFBFA;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #F5F5F4;
  --bg-elevated: #F0EFED;
  --border-color: #E8E8E6;
  --border-color-hover: #D0D0CE;

  /* Accent: Royal Purple */
  --accent-color: #4B0082;
  --accent-color-light: #6A1B9A;
  --accent-color-bg: rgba(75, 0, 130, 0.06);
  --accent-color-border: rgba(75, 0, 130, 0.15);

  /* Text Hierarchy */
  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-tertiary: #999999;
  --text-inverse: #FFFFFF;

  /* Typography */
  --font-title: 'Syne', 'Inter', sans-serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.5rem;
  --spacing-2xl: 4rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 100px;

  /* Layout */
  --max-width: 1440px;
  --header-max-width: 720px;
  --list-panel-width: 50%;
  --map-panel-width: 50%;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-dropdown: 0 8px 24px rgba(0,0,0,0.1);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  interpolate-size: allow-keywords;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

ul, ol { list-style: none; }
a { color: var(--accent-color); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-color-hover);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --------------------------------------------------------------------------
   3. App Shell — Split-Screen Layout
   -------------------------------------------------------------------------- */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  flex: 1;
  min-height: 0;
}

.list-panel {
  overflow-y: auto;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-2xl);
}

.map-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .list-panel {
    padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-2xl);
  }
  .map-panel {
    padding: var(--spacing-xl);
  }
  .map-footer {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    padding-top: 0;
  }
  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .chip-row::-webkit-scrollbar {
    display: none;
  }
}

#map {
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.map-footer {
  text-align: center;
  padding-top: var(--spacing-md);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.app-header {
  padding: var(--spacing-2xl) 0 1.5rem;
  max-width: var(--header-max-width);
  margin-left: auto;
  margin-right: auto;
}

.app-title {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  letter-spacing: -0.06em;
  line-height: 1;
  text-transform: lowercase;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: inline-block;
}



.app-bio {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 580px;
}

/* --------------------------------------------------------------------------
   5. Dual Search Dropdowns
   -------------------------------------------------------------------------- */
.search-section {
  padding: var(--spacing-md) 0 var(--spacing-sm) 0;
  max-width: var(--header-max-width);
  margin-left: auto;
  margin-right: auto;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

/* Custom Searchable Dropdown */
.dropdown-container {
  position: relative;
}

.dropdown-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: var(--spacing-xs);
}

.dropdown-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-input {
  width: 100%;
  padding: 12px 40px 12px 14px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  background: #F9F9F8;
  border: 1.5px solid var(--border-color-hover);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.dropdown-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.dropdown-input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-color-bg);
}

.dropdown-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: transform var(--transition-fast);
}

.dropdown-container.open .dropdown-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown-clear {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: none;
  line-height: 1;
}

.dropdown-clear:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.dropdown-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.dropdown-container.open .dropdown-options {
  display: block;
}

.dropdown-option {
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-option:last-child {
  border-bottom: none;
}

.dropdown-option:hover,
.dropdown-option.highlighted {
  background: var(--accent-color-bg);
  color: var(--accent-color);
}

.dropdown-option.selected {
  background: var(--accent-color-bg);
  color: var(--accent-color);
  font-weight: 600;
}

.dropdown-option-check {
  margin-right: 8px;
  font-weight: 700;
  color: var(--accent-color);
}

.dropdown-option-count {
  float: right;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 400;
}

.dropdown-no-results {
  padding: 14px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-align: center;
  font-style: italic;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: var(--spacing-xs) 0;
}

.dropdown-section-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 10px 14px;
  background-color: var(--bg-surface-hover);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.dropdown-section-header:first-child {
  border-top: none;
}

.dropdown-section-header:hover {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.section-chevron {
  font-size: 0.8rem;
  width: 12px;
  display: inline-block;
  text-align: center;
}

/* Selected Tags & Chips styling */
.selected-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-color);
  background: var(--accent-color-bg);
  border: 1px solid var(--accent-color-border);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.selected-tag:hover {
  background: rgba(75, 0, 130, 0.1);
}

.selected-tag-remove {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  line-height: 1;
  padding: 0;
  transition: opacity var(--transition-fast);
}

.selected-tag-remove:hover {
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   6. Conversational Prompt
   -------------------------------------------------------------------------- */
.conversational-prompt {
  display: none;
  padding: var(--spacing-sm) 0;
  max-width: var(--header-max-width);
  margin-left: auto;
  margin-right: auto;
}

.conversational-prompt.visible {
  display: block;
}

.prompt-text {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.prompt-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   7. Advanced Filters Tray
   -------------------------------------------------------------------------- */
.advanced-filters, .text-search-details {
  max-width: var(--header-max-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-sm);
  border: none;
}

.advanced-filters summary, .text-search-details summary {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--spacing-sm) 0;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: color var(--transition-fast);
}

.advanced-filters summary:hover, .text-search-details summary:hover {
  color: var(--accent-color);
}

.advanced-filters summary::before, .text-search-details summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 1.1rem;
  line-height: 1;
  padding-bottom: 2px;
  font-weight: 700;
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-sm);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.advanced-filters[open] summary::before, .text-search-details[open] summary::before {
  content: '−';
  background: var(--accent-color);
  color: var(--text-inverse);
  border-color: var(--accent-color);
}

.advanced-filters summary::-webkit-details-marker, .text-search-details summary::-webkit-details-marker {
  display: none;
}

.advanced-filters::details-content, .text-search-details::details-content {
  transition: content-visibility var(--transition-base) allow-discrete,
              opacity var(--transition-base);
  opacity: 0;
}

.advanced-filters[open]::details-content, .text-search-details[open]::details-content {
  opacity: 1;
}

.search-tray {
  padding: var(--spacing-xs) 0 var(--spacing-md) 0;
}

.text-search-input {
  width: 100%;
  max-width: calc(50% - var(--spacing-md) / 2);
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}

.text-search-input:focus {
  outline: none;
  border-color: var(--accent-color-border);
  box-shadow: 0 0 0 3px var(--accent-color-bg);
}

.filter-tray {
  padding: var(--spacing-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.filter-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

/* Price Tier Blocks */
.price-filter-row {
  display: flex;
  gap: var(--spacing-sm);
}

.price-block {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  line-height: 1;
}

.price-block:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-surface-hover);
}

.price-block.active {
  border-color: var(--accent-color);
  background: var(--accent-color-bg);
  color: var(--accent-color);
}

.price-char-dim {
  opacity: 0.2;
}

/* Toggle Chips (Dietary, Occasion) */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-chip {
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

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

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

/* --------------------------------------------------------------------------
   8. Directory Controls
   -------------------------------------------------------------------------- */
.directory-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-sm);
  max-width: var(--header-max-width);
}

.result-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

.clear-filters-btn {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-color);
  background: none;
  border: none;
  padding: 4px 0;
  display: none;
  transition: opacity var(--transition-fast);
}

.clear-filters-btn:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   9. Restaurant Rows (Frameless Cards)
   -------------------------------------------------------------------------- */
.restaurant-list {
  max-width: var(--header-max-width);
  margin-left: auto;
  margin-right: auto;
}

.restaurant-row {
  background: var(--bg-surface);
  border: 1px solid #EAEAEA;
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.restaurant-row:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.restaurant-row.highlighted {
  border-color: var(--accent-color);
  background: var(--accent-color-bg);
  box-shadow: 0 0 0 3px var(--accent-color-border);
}

/* Row Header: Name + Favourite */
.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  margin-bottom: 12px;
  flex-wrap: nowrap;
}

.name-and-star {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  min-width: 0;
  flex-grow: 1;
  flex-shrink: 1;
}

.row-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.aesthetic-map-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1.2;
}

.aesthetic-map-link:active {
  transform: scale(0.97);
}

.btn-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.link-text {
  display: inline-block;
  white-space: nowrap;
}

.aesthetic-map-link.website-btn {
  background-color: color-mix(in srgb, var(--accent-color) 75%, transparent);
  color: var(--text-inverse);
  border: 1.5px solid color-mix(in srgb, var(--accent-color) 75%, transparent);
}

.aesthetic-map-link.website-btn:hover {
  background-color: color-mix(in srgb, var(--accent-color-light) 85%, transparent);
  border-color: color-mix(in srgb, var(--accent-color-light) 85%, transparent);
  color: var(--text-inverse);
  text-decoration: none;
}

.aesthetic-map-link.directions-btn {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
}

.aesthetic-map-link.directions-btn:hover {
  color: var(--accent-color);
  background-color: var(--bg-surface-hover);
  border-color: var(--accent-color-border);
  text-decoration: none;
}

.restaurant-name {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.empty-state p {
  margin: 0;
  line-height: 1.5;
}

/* Grouped Locations Styles */
.locations-container {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.child-location-card {
  padding: 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
}

.child-location-card .row-header {
  margin-bottom: 8px;
}

.child-location-card .restaurant-name {
  font-size: 0.95rem;
}

.view-locations-btn {
  cursor: pointer;
  background-color: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
}

.view-locations-btn:hover {
  color: var(--accent-color);
  background-color: var(--bg-surface-hover);
  border-color: var(--accent-color-border);
}


.favourite-star {
  color: var(--accent-color);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 3px;
}

/* Metadata Line */
.row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.meta-item {
  white-space: nowrap;
}

.meta-separator {
  margin: 0 8px;
  color: var(--border-color-hover);
  font-weight: 300;
}

.meta-item,
.meta-location,
.meta-area {
  white-space: nowrap;
}

.meta-location {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pin-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Price Indicator Inline */
.price-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.price-indicator {
  display: inline-flex;
  gap: 1px;
  align-items: center;
}

.price-node {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  transition: opacity var(--transition-fast);
}

.price-node.dim {
  opacity: 0.25;
}

/* Secondary Meta (Cuisine Badge, WTG Badge, Occasion & Dietary Tags) */
.row-secondary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: 6px;
  align-items: center;
}

.meta-badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.meta-badge-style {
  background: var(--accent-color-bg);
  color: var(--accent-color);
  border: 1px solid var(--accent-color-border);
}

.meta-badge-wtg {
  background: rgba(180, 83, 9, 0.08);
  color: #B45309;
  border: 1px solid rgba(180, 83, 9, 0.15);
}

/* Borderless tags with SVG icons */
.meta-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  gap: 3px;
}

.meta-tag-occasion {
  color: var(--accent-color);
}

.meta-tag-dietary {
  color: #059669;
}

.ctx-icon {
  opacity: 0.85;
  flex-shrink: 0;
}

.dietary-letter-icon {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  min-width: 14px;
  height: 14px;
  padding: 0 1px;
  flex-shrink: 0;
  box-sizing: border-box;
  opacity: 0.85;
}

.restaurant-row-wtg {
  --accent-color: #B45309;
  --accent-color-light: #D97706;
  --accent-color-bg: rgba(180, 83, 9, 0.06);
  --accent-color-border: rgba(180, 83, 9, 0.15);
  background: #FFFDF8;
  border-color: rgba(180, 83, 9, 0.15);
}


/* --------------------------------------------------------------------------
   10. Accordion — Progressive Disclosure
   -------------------------------------------------------------------------- */
.row-expandables {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--spacing-md);
  row-gap: var(--spacing-xs);
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  background: #FAF9F9;
  border-top: 1px solid var(--border-color);
  margin-left: calc(-1 * var(--spacing-lg));
  margin-right: calc(-1 * var(--spacing-lg));
  margin-bottom: calc(-1 * var(--spacing-md));
  border-bottom-left-radius: calc(var(--radius-md) - 1px);
  border-bottom-right-radius: calc(var(--radius-md) - 1px);
}

.row-expandables:empty {
  display: none !important;
}

.row-accordion {
  margin-top: 0;
  display: inline-block;
  width: auto;
  border: none;
}

.row-accordion[open] {
  width: 100%;
}

.row-accordion summary {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-color);
  cursor: pointer;
  user-select: none;
  list-style: none;
  padding: 6px 0;
  transition: opacity var(--transition-fast);
  display: inline-flex;
  align-items: center;
}

.row-accordion summary::before {
  content: "+ ";
  margin-right: 2px;
}

.row-accordion[open] summary::before {
  content: "− ";
  margin-right: 2px;
}

.row-accordion summary::-webkit-details-marker {
  display: none;
}

.row-accordion summary:hover {
  opacity: 0.75;
}

.row-accordion::details-content {
  transition: content-visibility var(--transition-base) allow-discrete,
              opacity var(--transition-base);
  opacity: 0;
}

.row-accordion[open]::details-content {
  opacity: 1;
}

.accordion-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  padding: var(--spacing-sm) var(--spacing-md);
  background: #F4F4F6;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-top: var(--spacing-sm);
  box-sizing: border-box;
}

.accordion-dietary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.accordion-recommendation {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   11. No Results
   -------------------------------------------------------------------------- */
.no-results {
  padding: var(--spacing-2xl) 0;
  text-align: center;
}

.no-results-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.no-results-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   12. Leaflet Map Overrides
   -------------------------------------------------------------------------- */
.leaflet-container {
  font-family: var(--font-ui);
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
  border: 1px solid var(--border-color);
}

.leaflet-popup-content {
  margin: 0 !important;
  padding: 14px 16px !important;
  font-family: var(--font-ui) !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  min-width: 180px;
}

.leaflet-popup-tip {
  box-shadow: var(--shadow-sm) !important;
}

.popup-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.popup-wtg-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  background: rgba(180, 83, 9, 0.08);
  color: #B45309;
  border: 1px solid rgba(180, 83, 9, 0.15);
  margin-left: 6px;
  vertical-align: middle;
}

.custom-popup.popup-wtg {
  --accent-color: #B45309;
  --accent-color-light: #D97706;
  --accent-color-bg: rgba(180, 83, 9, 0.06);
  --accent-color-border: rgba(180, 83, 9, 0.15);
}


.popup-style {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.popup-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.popup-view-btn {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-color);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-ui);
  line-height: inherit;
}

.popup-view-btn:hover {
  text-decoration: underline;
}

/* Attribution override */
.leaflet-control-attribution {
  font-size: 0.65rem !important;
  background: rgba(251, 251, 250, 0.85) !important;
}

/* --------------------------------------------------------------------------
   13. Mobile Map Toggle FAB
   -------------------------------------------------------------------------- */
.map-toggle-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(75, 0, 130, 0.85); /* Premium royal purple translucent */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-inverse);
  border: none;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  will-change: transform, opacity;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background var(--transition-fast),
              box-shadow 0.2s ease;
  overflow: hidden;
}

/* Hidden state for map toggle FAB during inactivity */
.map-toggle-fab.fab-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  box-shadow: none;
}

/* Expanded state when map is visible — always fully visible */
.map-toggle-fab.fab-map-active {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  right: 24px;
  bottom: 24px;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.map-toggle-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(75, 0, 130, 0.3);
  background: var(--accent-color-light);
}

.map-toggle-fab:active {
  transform: scale(0.95);
}

.map-toggle-fab svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Circular clip-path reveal for map panel on mobile */
@media (max-width: 1023px) {
  .map-panel {
    clip-path: circle(0% at calc(100% - 52px) calc(100% - 52px));
    will-change: clip-path;
    transition: clip-path 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .map-panel.visible {
    clip-path: circle(150% at calc(100% - 52px) calc(100% - 52px));
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .map-toggle-fab {
    transition: none !important;
  }
  .map-panel {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.app-footer {
  padding: var(--spacing-xl) 0;
  border-top: 1px solid var(--border-color);
  max-width: var(--header-max-width);
  margin-left: auto;
  margin-right: auto;
}

.footer-text {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   15. Loading State
   -------------------------------------------------------------------------- */
.loading-state {
  padding: var(--spacing-2xl) 0;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.88rem;
}

.loading-dot {
  display: inline-block;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}



/* --------------------------------------------------------------------------
   16. Responsive — Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-bio br.mobile-hide {
    display: none;
  }

  .map-footer {
    display: none;
  }

  .list-panel {
    height: auto;
    position: static;
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-2xl);
  }

  .map-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    border-left: none;
    display: flex;
    pointer-events: none;
  }

  .map-panel.visible {
    pointer-events: auto;
  }

  .map-toggle-fab {
    display: flex;
  }

  .map-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 200;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .text-search-input {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .list-panel {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-2xl);
  }

  .app-title {
    font-size: 1.8rem;
  }

  .restaurant-name {
    font-size: 0.95rem;
  }

  .aesthetic-map-link {
    padding: 6px 7px;
    font-size: 0.75rem;
  }

  .aesthetic-map-link.expandable-link {
    max-width: 31px;
    overflow: hidden;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  }

  .aesthetic-map-link.expandable-link.expanded {
    max-width: 150px;
    padding: 6px 10px;
  }

  .aesthetic-map-link.expandable-link .link-text {
    opacity: 0;
    margin-left: 2px;
    transition: opacity 0.2s ease;
  }

  .aesthetic-map-link.expandable-link.expanded .link-text {
    opacity: 1;
    transition-delay: 0.1s;
  }
}

/* Google Maps Link Integration */
.card-map-link {
  color: var(--accent-color);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.card-map-link:hover {
  text-decoration: underline;
  color: var(--accent-color-light);
}

.popup-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: 8px;
}

.popup-map-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  line-height: inherit;
}

.popup-map-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* ==========================================================================
   SPLASH SCREEN
   ========================================================================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-surface);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.8s ease, opacity 0.8s ease, visibility 0.8s ease;
}

.splash-title {
  font-family: var(--font-ui);
  font-weight: 900;
  /* Use a slightly larger size for the splash screen for emphasis, or keep the same size as desktop. */
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: -0.06em;
  line-height: 1;
  text-transform: lowercase;
  color: var(--text-primary);
  margin: 0;
  /* Will be transitioned via JS */
  transform-origin: top left;
  will-change: transform;
}
