/* ============================================================
   MARCA ONE — Language switcher
   ============================================================ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  line-height: 1;
  flex: 0 0 auto;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 9px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.68;
  transition: background 0.18s ease, opacity 0.18s ease, color 0.18s ease;
}

.lang-btn:hover { opacity: 1; }
.lang-btn.active {
  background: #fff;
  color: #071733;
  opacity: 1;
}

.lang-sep {
  font-size: 11px;
  opacity: 0.4;
}

/* Header placement on pages that don't have .header-actions */
.lang-switch--in-header {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 60;
  color: #071733;
  border-color: rgba(7, 23, 51, 0.2);
  background: #fff;
}

.lang-switch--floating {
  position: fixed;
  right: 16px;
  bottom: 92px;
  z-index: 9999;
  background: #071733;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 26px rgba(7, 23, 51, 0.3);
}

/* Keep the switcher readable on dark and light headers */
.site-header .lang-switch { color: #071733; border-color: rgba(7, 23, 51, 0.16); background: #f3f6fb; }
.site-header .lang-btn.active { background: #071733; color: #fff; }

@media (max-width: 760px) {
  .header-actions .lang-switch { display: inline-flex; }
}

/* Elements hidden until translation is applied (prevents English flash in ES) */
html.m1-i18n-pending body { opacity: 0; }
html.m1-i18n-pending body { transition: opacity 0.15s ease; }
