/* Give Me The Dish — plain CSS, mobile-first. */

:root {
  --bg: #0f1115;
  --surface: #181c23;
  --surface-2: #212733;
  --border: #2c333f;
  --text: #eef1f6;
  --muted: #98a2b3;
  --accent: #ff7a45;
  --accent-dark: #e2612e;
  --live: #35d07f;
  --gold: #f5c451;
  --radius: 12px;
  --max: 1040px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* --- header --- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 500;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
.logo span { color: var(--accent); }

/* The brand name doesn't say where we are, so the city has to. */
.city-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: -8px;
}

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }

.nav a {
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent); color: #fff; }

/* --- page intro --- */
.intro { padding: 28px 0 8px; }
.intro h1 { margin: 0 0 6px; font-size: 1.7rem; letter-spacing: -0.02em; }
.intro p { margin: 0; color: var(--muted); }
.fallback-note:not(:empty) { margin-top: 6px !important; color: var(--accent) !important; font-size: 0.9rem; }

/* --- filters --- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 0;
}

.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

select, input, textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.92rem;
}

/* --- deal cards --- */
.deals { display: grid; gap: 12px; padding-bottom: 48px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .deals { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card.featured { border-color: var(--gold); background: linear-gradient(180deg, rgba(245,196,81,0.07), transparent 60%), var(--surface); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

.card h3 { margin: 0; font-size: 1.05rem; }
.card .biz { color: var(--muted); font-size: 0.9rem; margin: 2px 0 0; }
.card .price { color: var(--accent); font-weight: 700; }
.card .sched { font-size: 0.88rem; color: var(--muted); }

.badges { display: flex; gap: 6px; flex-wrap: wrap; }

.badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.live { background: rgba(53,208,127,0.16); color: var(--live); }
.badge.soon { background: var(--surface-2); color: var(--muted); }
.badge.featured { background: rgba(245,196,81,0.16); color: var(--gold); }

.card-foot { display: flex; align-items: center; gap: 12px; margin-top: 4px; }

.vote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.vote:hover { border-color: var(--accent); }
.vote.voted { background: var(--accent); border-color: var(--accent); color: #fff; }
.vote:disabled { opacity: 0.6; cursor: progress; }
/* No shared count available — show the arrow alone rather than a fake number. */
.vote .count:empty { display: none; }
.vote:has(.count:empty) { gap: 0; }

.meta { color: var(--muted); font-size: 0.85rem; }

.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* --- buttons --- */
.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }

/* --- wheel --- */
.wheel-stage { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 8px 0 48px; }
.wheel-frame { position: relative; width: min(92vw, 420px); }
.wheel-frame canvas { width: 100%; height: auto; display: block; }
.pointer {
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid var(--accent);
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}
.result { min-height: 84px; text-align: center; }
.result h2 { margin: 0 0 4px; font-size: 1.5rem; }
.result p { margin: 0; color: var(--muted); }
.fair-note { color: var(--muted); font-size: 0.82rem; text-align: center; max-width: 460px; }

/* --- map --- */
#map { height: 62vh; min-height: 380px; border-radius: var(--radius); border: 1px solid var(--border); }
.leaflet-popup-content { font: inherit; }
.popup-title { font-weight: 700; margin-bottom: 2px; }
.popup-deal { color: #444; font-size: 0.9rem; }

/* --- admin --- */
.admin-grid { display: grid; gap: 24px; padding-bottom: 48px; }
@media (min-width: 860px) { .admin-grid { grid-template-columns: 1fr 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.panel h2 { margin: 0 0 14px; font-size: 1.1rem; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }

.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 6px 10px; border-radius: 8px;
  font-size: 0.85rem; text-transform: none; letter-spacing: 0; color: var(--text);
  cursor: pointer;
}
.row { display: flex; gap: 12px; }
.row .field { flex: 1; }

.output {
  width: 100%;
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  white-space: pre;
  overflow: auto;
}

.note { color: var(--muted); font-size: 0.85rem; }

.draft-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.draft-list li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 0.9rem;
}
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

footer.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; padding: 20px 0 40px; }

/* --- tabs --- */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab-btn {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 10px 16px; font: inherit; font-size: 0.95rem;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn .badge-count {
  background: var(--surface-2); border-radius: 999px; padding: 2px 7px;
  font-size: 0.75rem; margin-left: 6px;
}

/* --- quick chips --- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 10px; font-size: 0.8rem;
  color: var(--text); cursor: pointer; transition: border-color 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* --- modal --- */
.modal-backdrop {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; padding: 24px; position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 1.3rem; }
.modal-close {
  background: none; border: none; font-size: 1.5rem; color: var(--muted);
  cursor: pointer; line-height: 1; padding: 4px;
}
.modal-close:hover { color: var(--text); }

/* --- toast notification --- */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 1100;
  background: var(--surface-2); border: 1px solid var(--live);
  color: var(--text); padding: 12px 20px; border-radius: 8px;
  font-size: 0.92rem; box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  display: flex; align-items: center; gap: 8px;
  transform: translateY(100px); opacity: 0; transition: transform 0.25s, opacity 0.25s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: #ff5252; }

