/* ----------------------------------------------------------------
 * Property of JIL Sovereign Technologies, Inc. (DE).
 * All Rights Reserved. 2025-2026 Patent Pending.
 * Author: Jeff Mendonca (Dallas TX)
 * File:   apps/central-portal/public/assets/jil-i18n.css
 * Repo:   jammer-x/jil-sovereign-full-go-live
 * Version: 2026.05.16-light-only
 *
 * Rewrite 2026-05-16: the previous version assumed a dark theme and
 * carried light-on-dark fallback hexes (`rgba(245,245,245,*)` text on
 * `rgba(26,26,26,*)` background). Once the portal went canonical
 * light-only the design tokens `--text-muted` / `--text-secondary` got
 * defined as DARK values while `--bg-elevated` remained undefined and
 * fell back to dark — giving dark-on-dark mobile dropdowns.
 *
 * This file is now LIGHT-FIRST. Every fallback hex is a light-theme
 * value (white surface, navy ink, gold accent, parchment border)
 * matching the sovereign-light canonical palette used across the site.
 * `var(--token, FALLBACK)` chains land on light-theme defaults when
 * tokens are missing, which is the only state we ship now.
 * ---------------------------------------------------------------- */
/* JIL i18n — Language Selector */

/* ── Dropdown wrapper ── */
.jil-i18n-wrap {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
}

.jil-i18n-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border, #e6dfd0);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  color: var(--text, #1a2332);
  font-size: 0.8125rem;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.jil-i18n-btn:hover {
  border-color: var(--gold, #b88d3a);
  background: var(--gold-soft, #fbf7ee);
}
.jil-i18n-btn img {
  opacity: 0.85;
  flex-shrink: 0;
}
.jil-i18n-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 2px;
  transition: transform 0.2s;
}
.jil-i18n-wrap.open .jil-i18n-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown menu (light surface) ── */
.jil-i18n-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e6dfd0);
  border-radius: 8px;
  padding: 6px 0;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(13, 32, 68, 0.10));
}
.jil-i18n-wrap.open .jil-i18n-dropdown {
  display: block;
}
.jil-i18n-dropdown a {
  display: block;
  padding: 8px 16px;
  color: var(--text, #1a2332);
  text-decoration: none;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s;
}
.jil-i18n-dropdown a:hover {
  background: var(--gold-soft, #fbf7ee);
  color: var(--text-heading, #0d2044);
}
.jil-i18n-dropdown a.active {
  color: var(--gold, #b88d3a);
  font-weight: 600;
  background: var(--gold-soft, #fbf7ee);
}

/* ── Mobile version (in-menu language grid) ── */
.jil-i18n-mobile {
  padding: 12px 20px;
  border-top: 1px solid var(--border, #e6dfd0);
  margin-top: 8px;
}
.jil-i18n-mobile .jil-i18n-mobile-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted, #6b7280);
  margin-bottom: 8px;
}
.jil-i18n-mobile .jil-i18n-mobile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.jil-i18n-mobile .jil-i18n-mobile-grid a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8125rem;
  color: var(--text, #1a2332);
  text-decoration: none;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e6dfd0);
  cursor: pointer;
  transition: all 0.15s;
}
.jil-i18n-mobile .jil-i18n-mobile-grid a:hover {
  background: var(--gold-soft, #fbf7ee);
  border-color: var(--gold, #b88d3a);
}
.jil-i18n-mobile .jil-i18n-mobile-grid a.active {
  background: var(--gold-soft, #fbf7ee);
  border-color: var(--gold, #b88d3a);
  color: var(--gold, #b88d3a);
  font-weight: 600;
}

/* ── Mobile native language <select> (next to hamburger) ── */
.jil-i18n-mobile-select {
  display: none;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e6dfd0);
  border-radius: 6px;
  padding: 6px 8px;
  height: 36px;
  flex-shrink: 0;
  margin-right: 8px;
  color: var(--text, #1a2332);
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  /* Dark chevron on light bg */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(26,35,50,0.55)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}
@media (max-width: 1080px) {
  .jil-i18n-mobile-select { display: block; flex-shrink: 0; order: 98; }
}
.jil-i18n-mobile-select option {
  background: #ffffff;
  color: #1a2332;
}

/* ── Fallback floating selector (top-right, for pages with no nav) ── */
.jil-i18n-fallback select {
  background: #ffffff;
  color: #1a2332;
  border: 1px solid var(--border, #e6dfd0);
}
.jil-i18n-fallback select option {
  background: #ffffff;
  color: #1a2332;
}

/* ── Defensive: block UA-forced dark from inverting our dropdowns ── */
@media (prefers-color-scheme: dark) {
  .jil-i18n-dropdown,
  .jil-i18n-mobile-grid a,
  .jil-i18n-mobile-select,
  .jil-i18n-mobile-select option,
  .jil-i18n-fallback select,
  .jil-i18n-fallback select option {
    background-color: #ffffff !important;
    color: #1a2332 !important;
  }
}

/* ── Hide legacy Google Translate chrome (was removed in PR #343 but
       guard remains in case any cached page still loads it) ── */
.goog-te-banner-frame,
.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight {
  display: none !important;
}
body { top: 0 !important; }
.goog-te-gadget { display: none !important; }

/* ── RTL adjustments ── */
html[dir="rtl"] .jil-i18n-dropdown { right: auto; left: 0; }
html[dir="rtl"] .v2-nav-actions { flex-direction: row-reverse; }
