/* ── Theme: light (default) ───────────────────────── */
:root {
  --bg-page: #f5f5f5;
  --bg-card: #fff;
  --bg-header: #fff;
  --text-primary: #262626;
  --text-secondary: #555;
  --text-muted: #888;
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;
  --input-bg: #f8f8f8;
  --brand: #033f38;
  --brand-light: #f0f8f6;
  --brand2: #05605a;
  --shadow: 0 4px 24px rgba(3,63,56,.10);
  --radius: 16px;
  --green-bg: #033f38;
  --green-text: #fff;
}

/* ── DARK MODE (fallback — injected JS does the heavy lift) ─── */
[data-theme="dark"] {
  --bg-page: #0d1117;
  --bg-card: #050505;
  --bg-header: #0a0a0a;
  --text-primary: #d0d0d0;
  --text-secondary: #8b949e;
  --text-muted: #5a6372;
  --border-color: #1a1a1a;
  --border-light: #111;
  --input-bg: #050505;
  --brand: #79AE6F;
  --brand-light: #0f1a0e;
  --brand2: #6a9a5e;
  --shadow: 0 4px 24px rgba(0,0,0,.6);
  --green-bg: #79AE6F;
  --green-text: #000;
}

/* ── Generic ──────────────────────────────────────── */
body { background: var(--bg-page); color: var(--text-primary); }

/* ── Fixed top bar (light mode) ───────────────────── */
.fixed-top {
  background: #79AE6F !important;
}

/* ── Green address cards (light mode) ─────────────── */
.card-address,
[class*="address-card"],
[class*="location-card"],
.branch-info,
.restaurant-address {
  background: var(--green-bg) !important;
  color: var(--green-text) !important;
  border: none !important;
  border-radius: 12px;
}
.card-address *,
[class*="address-card"] *,
[class*="location-card"] *,
.branch-info *,
.restaurant-address * {
  color: var(--green-text) !important;
}

/* ── Theme toggle button (inline, compact) ─────────── */
.theme-toggle-btn {
  width: 36px; height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f7971e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.4,0,.2,1),
              box-shadow .3s cubic-bezier(.4,0,.2,1),
              background .3s;
  line-height: 1;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(-8deg);
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.theme-toggle-btn:active {
  transform: scale(.85);
}
[data-theme="dark"] .theme-toggle-btn {
  background: rgba(20,20,30,.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #c084fc;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.06);
}
[data-theme="dark"] .theme-toggle-btn:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
}

/* ── Floating theme toggle group (light / night) ──── */
.theme-toggle-group {
  position: fixed;
  bottom: 100px;
  left: 16px;
  z-index: 9999;
  display: flex;
  gap: 3px;
  padding: 5px;
  border-radius: 30px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0,0,0,.10);
}

.theme-toggle-group .theme-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: transparent;
  color: #aaa;
  transition: transform .3s cubic-bezier(.4,0,.2,1),
              background .3s,
              box-shadow .3s,
              color .3s;
  line-height: 1;
}
.theme-toggle-group .theme-btn:hover {
  transform: scale(1.12);
}

/* Light button active in light mode */
[data-theme="light"] .theme-btn.is-light {
  background: linear-gradient(135deg, #f9d423, #f7971e);
  color: #fff;
  box-shadow: 0 3px 14px rgba(247,151,30,.35);
  transform: scale(1.05);
}

/* Dark button active in night mode */
[data-theme="dark"] .theme-btn.is-dark {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 3px 14px rgba(99,102,241,.35);
  transform: scale(1.05);
}

/* Dark mode container */
[data-theme="dark"] .theme-toggle-group {
  background: rgba(18,18,28,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.08);
}

/* ── Rotation animation on click ──────────────────── */
.theme-btn.rotating {
  animation: theme-pop .4s cubic-bezier(.4,0,.2,1);
}
@keyframes theme-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
