/* ==========================================================================
   Nutri POP · Globe switcher + shared design tokens
   Loaded by BOTH the product site and the introduction site so the two
   properties share one visual language and one locale system.
   ========================================================================== */

/* ---- 1. Unified design tokens -------------------------------------------
   One palette, one type scale. The product site used a near-black canvas
   with pink/violet/cyan; the intro site used deep purple with a wider hue
   ramp. We anchor both on the product site's darker base (better contrast
   for commerce UI) while keeping the intro site's warmer accents.        */
:root {
  /* brand core */
  --np-pink: #FF4D8D;
  --np-rose: #FF5DA2;
  --np-violet: #7B5CFF;
  --np-indigo: #6366F1;
  --np-cyan: #4FE3C1;
  --np-teal: #14B8A6;
  --np-orange: #FF9A3D;
  --np-amber: #FBBF24;
  --np-yellow: #FFD23F;
  --np-lime: #A3E635;

  /* surfaces — product site base, adopted by both */
  --np-bg: #07060B;
  --np-bg-2: #0D0B14;
  --np-surface: rgba(255, 255, 255, .045);
  --np-surface-2: rgba(255, 255, 255, .075);
  --np-line: rgba(255, 255, 255, .11);
  --np-ink: #FFF8FB;
  --np-muted: #C9C2D6;
  --np-dim: #9A93A8;

  --np-grad: linear-gradient(100deg, var(--np-pink), var(--np-violet) 52%, var(--np-cyan));
  --np-grad-warm: linear-gradient(100deg, var(--np-pink), var(--np-orange) 34%, var(--np-yellow) 62%, var(--np-cyan));

  --np-r-sm: 10px;
  --np-r-md: 16px;
  --np-r-lg: 24px;
  --np-r-full: 999px;

  --np-font-body: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --np-font-display: 'Baloo 2', 'Space Grotesk', system-ui, sans-serif;

  --np-ease: cubic-bezier(.22, 1, .36, 1);
  --np-shadow: 0 18px 48px rgba(0, 0, 0, .45);
}

/* ---- 2. The switcher ---------------------------------------------------
   Two separate dropdowns side by side. Each opens its own panel; opening
   one closes the other.                                      ------------- */
.globe-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.gsw { position: relative; }

.gsw-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--np-r-full);
  border: 1px solid var(--np-line);
  background: rgba(255, 255, 255, .05);
  color: var(--np-ink);
  font: 600 12.5px/1 var(--np-font-body);
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .22s, border-color .22s, transform .22s var(--np-ease);
  -webkit-tap-highlight-color: transparent;
}
.gsw-btn:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .22);
  transform: translateY(-1px);
}
.gsw-btn svg { opacity: .8; flex: 0 0 auto; }
.gsw-btn.on {
  background: rgba(255, 255, 255, .11);
  border-color: rgba(255, 77, 141, .55);
}
.gsw-btn.on .gsw-caret { transform: rotate(180deg); }
.gsw-caret { transition: transform .22s var(--np-ease); opacity: .6; }

.gsw-val { font-weight: 800; font-size: 12px; letter-spacing: .05em; }

/* Currency trigger shows the currency as a colour-coded chip. */
.gsw-btn-cur { padding: 0 11px 0 8px; }
.gsw-cur-chip {
  font: 800 9.5px/1 var(--np-font-body);
  letter-spacing: .02em;
  color: #fff;
  min-width: 34px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(var(--gp-h, 300) 72% 58%), hsl(calc(var(--gp-h, 300) + 42) 78% 46%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
}

/* Panel — anchored under its own trigger. Both panels are position:fixed so
   they escape the nav's stacking/blur contexts, and JS writes the exact
   trigger rect to --gsw-top / --gsw-right before opening. */
.gsw-pop[hidden] { display: none !important; }

.gsw-pop {
  position: fixed;
  top: var(--gsw-top, 70px);
  right: var(--gsw-right, 16px);
  left: auto;
  z-index: 1200;
  width: min(320px, calc(100vw - 28px));
  max-height: min(72vh, 540px);
  display: flex;
  flex-direction: column;
  padding: 12px 10px 10px;
  border-radius: var(--np-r-lg);
  border: 1px solid var(--np-line);
  background: rgba(11, 9, 18, .97);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: var(--np-shadow);
  animation: gpIn .2s var(--np-ease);
}
#gswLangPop { width: min(360px, calc(100vw - 28px)); }

@keyframes gpIn {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.gsw-hd {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 8px 10px;
  border-bottom: 1px solid var(--np-line);
  margin-bottom: 8px;
  flex: 0 0 auto;
}
.gsw-hd b {
  font: 800 11px/1 var(--np-font-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--np-pink);
}
.gsw-hd i {
  font: 500 11px/1.3 var(--np-font-body);
  font-style: normal;
  color: var(--np-dim);
}

.gsw-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
  flex: 1 1 auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.gsw-list::-webkit-scrollbar { width: 6px; }
.gsw-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .18);
  border-radius: 3px;
}

.gp-i {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: var(--np-r-sm);
  background: transparent;
  color: var(--np-muted);
  font: 500 13px/1.2 var(--np-font-body);
  text-align: left;
  cursor: pointer;
  transition: background .16s, color .16s;
  flex: 0 0 auto;
}
.gp-i:hover { background: rgba(255, 255, 255, .07); color: var(--np-ink); }
.gp-i.on {
  background: linear-gradient(90deg, rgba(255, 77, 141, .2), rgba(123, 92, 255, .12));
  color: #fff;
  box-shadow: inset 2px 0 0 var(--np-pink);
}

.gp-f {
  font-size: 15px;
  line-height: 1;
  flex: 0 0 auto;
  width: 20px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
    'Twemoji Mozilla', sans-serif;
}

/* Zero-dependency badge used instead of emoji flags: a colour chip keyed to
   the ISO code, so the switcher reads correctly on any machine. */
.gp-flag {
  font: 800 8.5px/1 var(--np-font-body);
  letter-spacing: .02em;
  color: #fff;
  width: 26px;
  height: 17px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(var(--gp-h, 300) 72% 58%), hsl(calc(var(--gp-h, 300) + 42) 78% 46%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
  overflow: hidden;
}

.gp-n { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-r {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: var(--np-dim);
  max-width: 40%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 3. Small screens --------------------------------------------------- */
@media (max-width: 560px) {
  .gsw-btn { height: 36px; padding: 0 10px; }
  .gsw-btn svg:first-child { width: 15px; height: 15px; }
  .gsw-val { font-size: 11px; }
  .gsw-cur-chip { min-width: 30px; height: 20px; font-size: 9px; }

  .gsw-pop,
  #gswLangPop {
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 80px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gsw-btn, .gsw-pop, .gsw-caret { animation: none; transition: none; }
}

/* ---- 4. Intro-site token bridge ----------------------------------------
   The intro site historically exposed --bg/--ink/--muted names. Remap them
   onto the shared palette so both properties read as one brand. */
:root {
  --ink: var(--np-ink);
  --muted: var(--np-muted);
  --dim: var(--np-dim);
  --line: var(--np-line);
  --pink: var(--np-pink);
  --rose: var(--np-rose);
  --violet: var(--np-violet);
  --indigo: var(--np-indigo);
  --purple: var(--np-violet);
  --cyan: var(--np-cyan);
  --teal: var(--np-teal);
  --orange: var(--np-orange);
  --yellow: var(--np-yellow);
  --amber: var(--np-amber);
  --lime: var(--np-lime);
}

/* Typography bridge — the product and intro sites now share one display
   face (Baloo 2). Body copy keeps each site's own text face for reading.
   Only the wordmark is remapped here; the per-site stylesheets were
   retargeted directly so there is nothing to out-rank. */
html body .logo { font-family: var(--np-font-display); }