/* SB Burger Week 2026 — Styles */

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

:root {
  --red: #e63946;
  --orange: #e76f51;
  --brown: #6b4226;
  --cream: #fdf0d5;
  --dark: #2b2b2b;
  --sidebar-width: 360px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  background: var(--dark);
  color: var(--dark);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ── Header ─────────────────────────────────── */

header {
  background: linear-gradient(135deg, var(--dark) 0%, #3a2a1e 100%);
  color: var(--cream);
  padding: 10px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 1000;
  position: relative;
  border-bottom: 3px solid var(--red);
  flex-shrink: 0;
}

header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

header h1 span {
  color: var(--orange);
  font-weight: 400;
  margin-left: 6px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.header-nav-link {
  color: var(--orange);
  text-decoration: none;
  font-size: 0.85rem;
}

.header-nav-link:hover {
  text-decoration: underline;
}

.header-nav-sep {
  color: #999;
  font-size: 0.85rem;
}

.about-link {
  color: var(--orange);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}

.about-link:hover {
  text-decoration: underline;
}

.github-icon {
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.1em;
}

/* ── Concluded banner ──────────────────────── */

.concluded-banner {
  display: none;
  background: linear-gradient(135deg, #fff8f0 0%, #ffe8cc 100%);
  color: var(--dark);
  text-align: center;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  border-bottom: 1px solid #f0d9b5;
  transition: background 0.15s;
}

.concluded-banner:hover {
  background: linear-gradient(135deg, #ffe8cc 0%, #ffd9a8 100%);
}

/* ── Concluded modal ──────────────────────── */

.concluded-modal {
  max-width: 360px;
}

.concluded-ctas {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.concluded-ctas .tip-amount-btn {
  flex: 1 1 0;
  max-width: 50%;
}

.concluded-note {
  font-size: 0.78rem;
  color: #999;
  font-style: italic;
  margin-bottom: 0;
}

/* ── Layout ─────────────────────────────────── */

.app {
  display: flex;
  flex: 1;
  height: calc(100vh - 47px);
  height: calc(100dvh - 47px);
  overflow: hidden;
}

/* ── Sidebar ────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-controls {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}

.search-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #999;
  pointer-events: none;
  transition: color 0.15s;
}

.search-wrapper:focus-within .search-icon {
  color: var(--red);
}

.search-box {
  width: 100%;
  padding: 8px 12px 8px 30px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.15);
}

/* ── Filter toggle ────────────────────────── */

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

.search-row .search-wrapper {
  flex: 1;
}

.filter-toggle-btn {
  display: none;
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 14px;
  background: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.filter-toggle-btn:hover {
  background: #f0f0f0;
}

.filter-toggle-btn.has-filters {
  background: var(--red);
  color: #fff;
  border-color: transparent;
}

.filter-panel.open {
  display: block;
}

.area-filters {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.filter-row {
  display: grid;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid #eee;
}

.filter-row:first-of-type {
  padding-top: 0;
  border-top: none;
}

.filter-row-areas {
  grid-template-columns: repeat(3, 1fr);
}

.filter-row-tags {
  grid-template-columns: repeat(3, 1fr);
}

.filter-row-hours {
  grid-template-columns: repeat(3, 1fr);
}

.area-btn {
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 14px;
  background: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-align: center;
}

.area-btn:hover {
  background: #f0f0f0;
}

.area-btn.active {
  color: #fff;
  border-color: transparent;
}

.clear-filters-btn {
  width: 100%;
  background: var(--red);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.clear-filters-btn:hover {
  background: #c62d3a;
  color: #fff;
}
.area-btn[data-area="Downtown SB"].active {
  background: #e63946;
}
.area-btn[data-area="Goleta"].active {
  background: #2d6a4f;
}
.area-btn[data-area="Carpinteria"].active {
  background: #1d3557;
}
.area-btn[data-area="Isla Vista"].active {
  background: #7b2cbf;
}
.area-btn[data-area="Santa Ynez"].active {
  background: #e76f51;
}
.area-btn[data-area="Other SB"].active {
  background: #e07a5f;
}

/* ── Tag filter buttons ──────────────── */

.area-btn[data-tag].active {
  background: var(--dark);
}

.tag-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  transition: filter 0.15s;
}

.area-btn[data-tag].active .tag-icon {
  filter: brightness(0) invert(1);
}

/* ── Dietary tag icons (sidebar + popup) ─── */

.dietary-tags {
  display: inline-flex;
  gap: 3px;
  margin-right: 5px;
  vertical-align: middle;
}

.dietary-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  opacity: 0.7;
}

.popup-section-name .dietary-icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  opacity: 0.8;
}

/* ── Tip Jar button ──────────────────────── */

.tip-jar-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  border: 2px solid var(--orange);
}

@keyframes tip-ripple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.tip-jar-btn {
  position: relative;
}

.tip-jar-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--orange);
  animation: tip-ripple 2.5s ease-out 5;
  pointer-events: none;
  z-index: -1;
}

.tip-jar-btn:hover::after {
  animation: none;
  opacity: 0;
}

.tip-jar-btn:hover {
  animation: none;
  background: #ffe8cc;
  transform: scale(1.05);
}

/* ── Tip Jar modal ──────────────────────── */

.tip-jar-modal {
  max-width: 360px;
}

.tip-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.tip-amount-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8f8f8;
  border: 2px solid #eee;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  flex: 1 1 0;
  min-width: 0;
  max-width: calc(33.33% - 8px);
}

.tip-amount-btn:hover {
  background: var(--cream);
  border-color: var(--orange);
  transform: translateY(-2px);
}

.tip-amount-featured {
  border-color: var(--orange);
  background: #fff8f0;
}

.tip-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.tip-emoji-half {
  display: inline-block;
  width: 0.7em;
  overflow: hidden;
}

.tip-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
  line-height: 1.2;
}

.tip-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--red);
}

.tip-amount-btn.tip-amount-share {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 8px 16px;
  flex-direction: row;
  gap: 8px;
  justify-content: center;
}

.tip-amount-btn.tip-amount-share .tip-emoji {
  font-size: 1rem;
}

.tip-amount-btn.tip-amount-share .tip-price {
  font-size: 0.85rem;
}

.tip-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.tip-qr img {
  border-radius: 8px;
  border: 1px solid #eee;
}

.tip-qr-label {
  font-size: 0.72rem;
  color: #999;
}

/* ── Tip Jar progress bar ──────────────────── */

.tip-progress {
  margin: 0 20px 16px;
  text-align: center;
}

.tip-progress-bar {
  height: 22px;
  border-radius: 11px;
  background: #f0f0f0;
  position: relative;
}

.tip-progress-fill {
  height: 100%;
  border-radius: 11px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  transition: width 0.5s ease;
  width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.tip-progress-amount {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  padding-right: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.tip-progress-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 11px;
}

.tip-progress-tick {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
}

.tip-progress-labels {
  position: relative;
  height: 32px;
  margin-top: 4px;
}

.tip-progress-label {
  position: absolute;
  font-size: 0.62rem;
  color: #888;
  transform: translateX(-50%);
  top: 0;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.tip-progress-label strong {
  display: block;
  font-size: 0.68rem;
  color: #666;
}

.tip-progress-note {
  font-size: 0.68rem;
  color: #999;
  margin-top: 8px;
  font-style: italic;
}

.tip-progress-note a {
  color: var(--orange);
  text-decoration: none;
}

.tip-progress-note a:hover {
  text-decoration: underline;
}

/* ── FAB: Select & Print ─────────────────── */

.fab-wrapper {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
}

.fab-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.fab-btn:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

.fab-wrapper.active .fab-btn {
  background: var(--red);
  color: #fff;
}

.fab-toolbar {
  display: none;
  align-items: center;
  gap: 6px;
  background: #fff;
  padding: 6px 12px;
  border-radius: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.fab-wrapper.active .fab-toolbar {
  display: flex;
}

.fab-count {
  font-size: 0.78rem;
  color: #666;
  font-weight: 500;
  margin-right: 4px;
}

.fab-action-btn {
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 14px;
  background: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.fab-action-btn:hover {
  background: #f0f0f0;
}

.fab-print-btn {
  border-color: var(--red);
  color: var(--red);
}

.fab-print-btn:hover {
  background: var(--red);
  color: #fff;
}

.fab-hint {
  font-size: 0.68rem;
  color: #999;
  font-style: italic;
}

.checklist-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 8px;
}

.restaurant-item.unchecked {
  opacity: 0.4;
}

.restaurant-item.unchecked:hover {
  opacity: 0.65;
}

.checklist-summary {
  color: var(--red);
  font-weight: 600;
}

.restaurant-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.restaurant-list::-webkit-scrollbar {
  width: 6px;
}

.restaurant-list::-webkit-scrollbar-track {
  background: transparent;
}

.restaurant-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.restaurant-list::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.restaurant-item {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.restaurant-item:hover {
  background: #fdf0d5;
  border-left-color: var(--orange);
}

.restaurant-item.active {
  background: #fdf0d5;
  border-left-color: var(--red);
}

.name-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.restaurant-item .name {
  font-size: 0.9rem;
  font-weight: 500;
}

.menu-item-subtitle {
  font-size: 0.78rem;
  font-style: italic;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  margin-left: 8px;
  gap: 4px;
}

.restaurant-item .area-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  flex-shrink: 0;
  white-space: nowrap;
}

.sidebar-upvote {
  background: #fff3e0;
  border: 1px solid #f9a825;
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 0.7rem;
  cursor: pointer;
  color: #e65100;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.sidebar-upvote:hover {
  background: #ffe0b2;
  border-color: #f57f17;
}

.sidebar-upvote.upvoted {
  background: #fff3e0;
  border-color: #f9a825;
  color: #e65100;
}

.sidebar-upvote.zero {
  background: none;
  border: 1px dashed #ccc;
  color: #aaa;
}

.sidebar-upvote.zero:hover {
  background: #fafafa;
  border: 1px solid #bbb;
  color: #888;
}

.sidebar-upvote.zero:hover .upvote-heart {
  opacity: 1;
}

.sidebar-upvote .upvote-heart {
  font-size: 0.75rem;
}

.sidebar-upvote.zero .upvote-heart {
  opacity: 0.4;
}

.sidebar-upvote .upvote-count {
  font-size: 0.7rem;
}

.restaurant-count {
  padding: 6px 14px;
  font-size: 0.78rem;
  color: #888;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.no-results {
  padding: 24px 14px;
  text-align: center;
  color: #999;
  font-size: 0.9rem;
}

/* ── About modal ───────────────────────────── */

.about-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.25s ease;
}

.about-overlay.open {
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.about-modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 360px;
  width: 90%;
  position: relative;
  text-align: center;
  opacity: 0;
  transform: scale(0.92) translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.about-overlay.open .about-modal {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.about-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.about-close:hover {
  color: var(--dark);
}

.about-modal h2 {
  font-size: 1.15rem;
  margin-bottom: 2px;
  color: var(--dark);
}

.about-dates {
  color: var(--orange);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.about-body {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 16px;
  text-align: center;
}

.about-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.about-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 10px;
  background: #f8f8f8;
  border: 1px solid #eee;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.about-link-card:hover {
  background: var(--cream);
  border-color: var(--orange);
  transform: translateY(-1px);
}

.about-link-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.about-link-icon .github-icon {
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
}

.about-link-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
}
.about-link-desc {
  font-size: 0.6rem;
  color: #888;
  text-align: center;
  line-height: 1.2;
}

.about-footer {
  font-size: 0.82rem;
  color: #999;
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 4px;
}

.about-footer a {
  color: var(--orange);
  text-decoration: none;
}

.about-footer a:hover {
  text-decoration: underline;
}

/* ── Map ────────────────────────────────────── */

#map {
  flex: 1;
  z-index: 1;
}

/* Burger icon overlay on selected marker */
.burger-icon-wrapper {
  background: none !important;
  border: none !important;
}

.burger-icon {
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}


/* Popup styling */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 13px 16px;
}

.popup-accent {
  height: 3px;
  margin: -15px -20px 10px;
  border-radius: 0;
}

.popup-content {
  position: relative;
}

.popup-content h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--dark);
  padding-right: 50px;
}

.popup-content p {
  font-size: 0.82rem;
  color: #555;
  margin-top: 0;
  margin-bottom: 2px;
}

.popup-content .popup-burger {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.popup-content .popup-description {
  margin-top: 0;
  text-align: justify;
}

.popup-coming-soon {
  color: #999;
  font-style: italic;
}

.coming-soon {
  color: #bbb;
}

/* ── Hours in popup ──────────────────────── */

.popup-hours {
  font-size: 0.82rem;
  color: #555;
  margin-top: 4px;
  min-height: 0;
}

.popup-hours:empty {
  display: none;
}

.popup-hours-dot {
  font-size: 0.7rem;
}

/* ── Hours badge in sidebar ──────────────── */

.hours-dot {
  display: inline-block;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 8px;
  margin-top: 2px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.03em;
}

.hours-dot.closing-soon {
  color: #e65100;
  background: #fff3e0;
  border: 1px solid #ffcc80;
}

.hours-dot.closed {
  color: #c62828;
  background: #fce4ec;
  border: 1px solid #ef9a9a;
}

/* ── Hours filter buttons ────────────────── */

.area-btn[data-hours].active {
  background: var(--dark);
  color: #fff;
  border-color: transparent;
}



.popup-section {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 6px 8px;
  margin-top: 6px;
}

.popup-section-name {
  background: none;
  border: none;
  padding: 0;
  margin-top: 0;
}

.popup-section-name + .popup-section {
  margin-top: 2px;
}

.popup-section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.popup-address-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.82rem;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.3;
}

.popup-pin {
  flex-shrink: 0;
  color: var(--red);
  margin-top: 1px;
}

.popup-directions-btns {
  display: flex;
  gap: 4px;
  width: 100%;
}

.popup-dir-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 0;
  justify-content: center;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: var(--dark);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.popup-dir-btn:hover {
  background: #fdf0d5;
  border-color: var(--orange);
}

.popup-dir-btn svg {
  flex-shrink: 0;
  color: var(--red);
}

.popup-section-info {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ── Popup upvote button (inline with address) ──────── */

.popup-upvote {
  margin-left: auto;
  flex-shrink: 0;
}

.upvote-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 14px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  line-height: 1;
  flex-shrink: 0;
}

.upvote-btn:hover {
  background: #e8e8e8;
  border-color: #bbb;
}

.upvote-btn:active {
  transform: scale(0.95);
}

.upvote-btn.upvoted {
  background: #fff3e0;
  border-color: #f9a825;
  color: #e65100;
}

.upvote-btn.zero {
  background: none;
  border: 1px dashed #ccc;
  color: #aaa;
}

.upvote-btn.zero:hover {
  background: #fafafa;
  border: 1px solid #bbb;
  color: #888;
}

.upvote-btn.zero .upvote-heart {
  opacity: 0.4;
}

.popup-upvote.zero .upvote-heart {
  opacity: 0.6;
}

.upvote-btn.zero:hover .upvote-heart {
  opacity: 1;
}

.upvote-btn.frozen {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.upvote-heart {
  font-size: 0.85rem;
  line-height: 1;
}

.upvote-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dark);
  min-width: 0;
}

.popup-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 7px 12px;
  background: #f9f9f9;
  color: var(--dark);
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
}

.popup-share-btn:hover {
  background: #fdf0d5;
  border-color: var(--orange);
}

.popup-share-btn svg {
  flex-shrink: 0;
}

.popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 0;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 14px;
  color: var(--red);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.popup-btn:hover {
  background: #fdf0d5;
  border-color: var(--red);
}

.popup-btn svg {
  flex-shrink: 0;
}

/* ── Mobile toggle button (hidden — replaced by peek drawer) */

.mobile-toggle {
  display: none;
}

/* ── Drag handle for mobile drawer ─────────── */

.drag-handle {
  display: none;
}

.drag-handle-zone {
  display: none;
}

/* ── Mobile ─────────────────────────────────── */

@media (max-width: 768px) {
  .app {
    flex-direction: column;
  }

  header {
    padding: 6px 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  header h1 {
    font-size: 0.9rem;
  }

  .sidebar {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90vh;
    height: 90dvh;
    z-index: 1050;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(var(--drawer-offset, 100%));
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar.dragging {
    transition: none;
  }

  .sidebar .drag-handle {
    display: block;
  }

  .drag-handle-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    cursor: grab;
    flex-shrink: 0;
    touch-action: none;
  }

  .drag-handle {
    width: 40px;
    height: 5px;
    background: #ccc;
    border-radius: 3px;
    transition: background 0.15s, width 0.15s;
  }

  .sidebar.snap-flash .drag-handle {
    background: var(--red);
    width: 50px;
  }

  #map {
    width: 100%;
    height: calc(100vh - 36px);
    height: calc(100dvh - 36px);
  }

  /* Bigger touch targets */
  .restaurant-item {
    padding: 14px 16px;
  }

  .area-btn {
    padding: 8px 14px;
    min-height: 36px;
    font-size: 0.8rem;
  }

  .search-box {
    padding: 12px 14px 12px 34px;
    font-size: 1rem;
  }

  .checklist-checkbox {
    width: 20px;
    height: 20px;
  }

  /* ── Mobile FAB ───────────────────────────── */

  .fab-wrapper {
    flex-direction: column-reverse;
    align-items: flex-end;
  }

  .fab-toolbar {
    flex-direction: column;
    padding: 8px 10px;
    border-radius: 14px;
    gap: 4px;
  }

  .fab-action-btn {
    padding: 8px 14px;
    min-height: 36px;
    font-size: 0.8rem;
    width: 100%;
    text-align: center;
  }

  /* ── Mobile filter toggle ────────────────── */

  .filter-toggle-btn {
    display: block;
    padding: 8px 14px;
    min-height: 36px;
    font-size: 0.8rem;
  }

  .filter-panel {
    display: none;
  }

  /* ── Mobile popup sizing ───────────────── */

  .popup-content h3 {
    font-size: 1.05rem;
  }

  .popup-content p {
    font-size: 0.9rem;
  }

  .popup-content .popup-burger {
    font-size: 0.9rem;
  }

  .popup-btn {
    padding: 8px 10px;
    min-height: 36px;
    font-size: 0.82rem;
  }

  .popup-dir-btn {
    padding: 8px 10px;
    min-height: 36px;
    font-size: 0.82rem;
  }

  .popup-dir-btn .dir-label {
    display: none;
  }

  .popup-share-btn {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .upvote-btn {
    padding: 6px 10px;
    font-size: 0.88rem;
  }

}

/* ── Cluster tooltip ────────────────────────── */

.cluster-tooltip-wrapper {
  padding: 0;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cluster-tooltip {
  font-size: 0.82rem;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
}

.cluster-tooltip div {
  padding: 2px 4px;
}

/* ── Marker Cluster overrides ───────────────── */

.marker-cluster-small {
  background-color: rgba(230, 57, 70, 0.25);
}

.marker-cluster-small div {
  background-color: rgba(230, 57, 70, 0.7);
  color: #fff;
}

.marker-cluster-medium {
  background-color: rgba(231, 111, 81, 0.25);
}

.marker-cluster-medium div {
  background-color: rgba(231, 111, 81, 0.7);
  color: #fff;
}

.marker-cluster-large {
  background-color: rgba(107, 66, 38, 0.25);
}

.marker-cluster-large div {
  background-color: rgba(107, 66, 38, 0.7);
  color: #fff;
}

/* ── Marker drop shadow ───────────────────── */

.leaflet-overlay-pane svg path {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* ── Cluster tooltip header ───────────────── */

.cluster-tooltip-header {
  font-weight: 600;
  font-size: 0.72rem;
  color: #888;
  padding: 4px 6px 2px;
  border-bottom: 1px solid #eee;
  margin-bottom: 2px;
}

/* ── Loading overlay ──────────────────────── */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.loading-overlay.loaded {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #eee;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
