/* ==========================================================================
   Location / language picker (modal) — assets/css/locale.css
   Self-contained: uses its own --loc-* colours, so it stays dark even if the
   site's --text-dark / --text-grey variables hold light-theme values.
   ========================================================================== */
.locale-overlay{
  --loc-bg:#0e1320; --loc-border:#2a3350; --loc-text:#f1f4fa;
  --loc-muted:#9aa6bf; --loc-accent:#5dade2; --loc-hover:#1d2539;

  position:fixed; inset:0; z-index:10000; overflow-y:auto;
  background:rgba(8,11,19,.78);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  opacity:0; visibility:hidden;
  transition:opacity .25s ease, visibility .25s ease;
}
.locale-overlay.open{ opacity:1; visibility:visible; }

.locale-overlay-inner{
  max-width:1240px; margin:4vh auto; padding:30px 40px 18px;
  background:var(--loc-bg); border:1px solid var(--loc-border); border-radius:14px;
  box-shadow:0 24px 70px rgba(0,0,0,.55);
  transform:translateY(14px); transition:transform .25s ease;
}
.locale-overlay.open .locale-overlay-inner{ transform:none; }

.locale-head{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding-bottom:20px; margin-bottom:28px; border-bottom:1px solid var(--loc-border);
}
.locale-head-title{ font-size:18px; color:var(--loc-muted); }
.locale-head-title strong{ color:var(--loc-text); font-weight:700; }

.locale-close{
  flex:none; width:40px; height:40px; display:grid; place-items:center;
  background:transparent; color:var(--loc-text);
  border:1px solid var(--loc-border); border-radius:50%; cursor:pointer;
  transition:background .2s, border-color .2s;
}
.locale-close:hover, .locale-close:focus-visible{ background:var(--loc-hover); border-color:var(--loc-accent); outline:0; }
.locale-close svg{ width:18px; height:18px; }

.locale-grid{ columns:5; column-gap:40px; }
.locale-item{ break-inside:avoid; margin-bottom:28px; }
.locale-country{ font-size:15.5px; font-weight:700; color:var(--loc-text); margin-bottom:4px; }
.locale-langs a{ color:var(--loc-muted); text-decoration:none; font-size:14px; }
.locale-langs a:hover, .locale-langs a:focus-visible{ color:var(--loc-accent); text-decoration:underline; outline:0; }
.locale-langs .sep{ color:var(--loc-accent); margin:0 2px; font-size:12px; }

@media (max-width:1100px){ .locale-grid{ columns:3; } }
@media (max-width:720px){
  .locale-grid{ columns:2; column-gap:24px; }
  .locale-overlay-inner{ margin:0; min-height:100%; border-radius:0; border:0; padding:20px; }
}
@media (max-width:480px){ .locale-grid{ columns:1; } }
@media (prefers-reduced-motion:reduce){
  .locale-overlay, .locale-overlay-inner{ transition:none; }
}

/* ==========================================================================
   Language button (the trigger that opens the modal) — goes in your header
   ========================================================================== */
.lang-btn{
  display:inline-flex; align-items:center; gap:8px;
  height:38px; padding:0 14px; margin:0 8px 0 0;
  vertical-align:middle; line-height:1; white-space:nowrap;
  background:transparent; color:#cdd5e4;
  font:inherit; font-size:14px; font-weight:600;
  border:1px solid #2a3350; border-radius:999px; cursor:pointer;
  transition:background .2s, border-color .2s, color .2s;
}
.lang-btn:hover, .lang-btn:focus-visible{ background:#1d2539; border-color:#5dade2; color:#fff; outline:0; }
.lang-btn svg{ width:18px; height:18px; flex:none; }
.lang-btn .lang-caret{ width:10px; height:10px; opacity:.7; }

/* small phones: globe icon only, to save room next to the menu button */
@media (max-width:575px){
  .lang-btn{ height:36px; padding:0 10px; gap:0; }
  .lang-btn .lang-label, .lang-btn .lang-caret{ display:none; }
}

/* Landrick hides .buy-button on phones <= 375px wide; keep the language button visible there */
@media (max-width:375px){
  #topnav .buy-button{ display:block !important; padding:3px 0; }
  #topnav .buy-button > *:not(.lang-btn):not(:has(.lang-btn)){ display:none !important; }
  #topnav .buy-button .lang-btn{ margin-right:6px; }
}