/* YenSika shared theme. Light is the default — dark is opt-in via the
   toggle, not forced. Preference is remembered per-browser. */

/* YenSika shared theme. Light is the default — dark is opt-in via the
   toggle, not forced. Preference is remembered per-browser.

   Palette: deep forest green (brand), warm Adinkra gold (accent/CTA),
   terracotta clay (secondary accent, from the kente red), warm paper
   background — deliberately warmer and richer than a generic
   green-on-white fintech template. */

:root {
  --bg: #fbf3e3;
  --surface: #ffffff;
  --surface-alt: #f3e8d2;
  --text: #1a2820;
  --text-muted: #6b6255;
  --border: #e8dcc4;
  --brand: #0b3d2c;
  --brand-deep: #082a1e;
  --brand-text: #ffffff;
  --accent: #c89b3c;
  --accent-hover: #b3872e;
  --clay: #b65c38;
  --clay-hover: #9c4c2d;
  --danger: #b3432f;
  --danger-hover: #9c3826;
  --shadow: rgba(11, 61, 44, 0.1);
}

[data-theme="dark"] {
  --bg: #10201a;
  --surface: #17281f;
  --surface-alt: #1c2f24;
  --text: #f3ead9;
  --text-muted: #a89f8c;
  --border: #2c4034;
  --brand: #0b3d2c;
  --brand-deep: #082a1e;
  --brand-text: #f3ead9;
  --accent: #d9ad52;
  --accent-hover: #e6bd6a;
  --clay: #c9704a;
  --clay-hover: #d68159;
  --danger: #c9573e;
  --danger-hover: #d6684f;
  --shadow: rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
}
.theme-toggle:hover { background: var(--surface-alt); }

/* Use this variant whenever the toggle sits on the dark green brand
   header — the default var(--text) is too dark to see there. */
.theme-toggle-on-brand {
  border-color: rgba(255,255,255,0.4);
  color: #ffffff;
}
.theme-toggle-on-brand:hover { background: rgba(255,255,255,0.12); }

.breadcrumb { max-width: 960px; margin: 0.9rem auto 0; padding: 0 1.5rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* Install App button — hidden by default, shown by app.js only when
   the browser reports the app is actually installable. */
.install-app-btn {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: #e8a33d;
  color: #14342a;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.install-app-btn:hover { background: #d99424; }

/* Hamburger button — visible only on narrow screens, where the full
   nav link list doesn't fit. */
.hamburger-btn {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: #ffffff;
  width: 38px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Slide-out mobile drawer */
.mobile-drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 40;
}
.mobile-drawer-overlay.open { display: block; }

.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 260px;
  background: var(--surface);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
  padding: 1.5rem 1.2rem;
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer .drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.mobile-drawer .drawer-close { background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.mobile-drawer a { display: block; color: var(--text); text-decoration: none; padding: 0.8rem 0; font-size: 0.95rem;
                    border-bottom: 1px solid var(--border); }
.mobile-drawer a:last-child { border-bottom: none; }

@media (max-width: 760px) {
  nav.main-nav { display: none !important; }
  .hamburger-btn { display: flex !important; }
}

.sell-cta { color: #ffffff; text-decoration: none; font-size: 0.85rem; background: rgba(255,255,255,0.15);
            padding: 0.45rem 0.8rem; border-radius: 8px; }
.sell-cta:hover { background: rgba(255,255,255,0.25); }

/* Bottom mobile app-style tab bar — hidden on desktop, fixed to the
   bottom of the screen on narrow devices for quick thumb navigation. */
.bottom-tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 30;
  padding: 0.4rem 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.bottom-tabbar .tabs { display: flex; justify-content: space-around; }
.bottom-tabbar a, .bottom-tabbar button {
  background: none; border: none; color: var(--text-muted); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  font-size: 0.68rem; padding: 0.3rem 0.5rem; cursor: pointer; flex: 1;
}
.bottom-tabbar a.active, .bottom-tabbar a:hover { color: var(--accent); }
.bottom-tabbar svg { display: block; }

@media (max-width: 760px) {
  .bottom-tabbar { display: block; }
  body { padding-bottom: 60px; } /* leave room so content isn't hidden behind the tab bar */
}

/* Shared header nav — used on every logged-in customer page for
   consistency. Individual pages should NOT redeclare these rules. */
nav.main-nav { display: flex; flex-wrap: wrap; }
nav.main-nav a { color: #ffffff; text-decoration: none; font-size: 0.88rem; opacity: 0.92; margin-right: 1.1rem; }
nav.main-nav a:last-child { margin-right: 0; }
nav.main-nav a:hover { opacity: 1; text-decoration: underline; }

/* Global logo link rule — every page's header logo is an <a>, and a
   bare <a> defaults to underlined browser link styling unless this is
   set. Setting it once here means no page can forget it (this is
   exactly what went wrong on vtu.html — an inline style was relied on
   instead of a shared rule, and one page just didn't have it). */
a.logo { text-decoration: none !important; }

/* Floating WhatsApp support button — injected by app.js only when a
   support number is actually configured. Positioned above the bottom
   tab bar on mobile so they never overlap. */
.yensika-whatsapp-fab {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 40;
  text-decoration: none;
}
.yensika-whatsapp-fab:hover { background: #1ebe57; }
@media (max-width: 760px) {
  .yensika-whatsapp-fab { bottom: 76px; right: 1rem; width: 48px; height: 48px; }
}
