/*
 * ═══════════════════════════════════════════════════════════════════════
 *  module_lang_switcher.css  —  Language Switcher Module
 *  Daralbeida.com  ·  DAB-VIS-CSS-LANG-001  ·  v2.1  ·  May 2026
 *
 *  CHANGELOG
 *  ─────────
 *  v2.1  May 2026  — Reduced trigger button size (was too prominent
 *                    against the hero). Smaller padding, font-size,
 *                    letter-spacing, gap.
 *  v2.0  May 2026  — Refactored to dropdown from pill row
 *
 *  SECTIONS
 *  ────────
 *  1. Header layout
 *  2. Trigger button    ← reduced size in v2.1
 *  3. Dropdown panel
 *  4. Responsive
 * ═══════════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════════
   1. HEADER LAYOUT
   ═══════════════════════════════════════════════════════════════════════ */
.site-header {
  position: relative;
  padding: 16px 24px;
}

.header-lang {
  position: fixed;   /* relative to the window, so the offsets are exact */
  top: 15px;         /* 15px from the top edge of the window */
  right: 15px;       /* 15px from the right edge of the window */
  z-index: 600;      /* above the fixed header (z 500) */
}

.lang-switcher {
  position: relative;
  direction: ltr;
}


/* ═══════════════════════════════════════════════════════════════════════
   2. TRIGGER — just the flag now (no pill box). Hover opens the menu.
   ═══════════════════════════════════════════════════════════════════════ */
.lang-trigger {
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;   /* no pill */
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.lang-trigger:hover {
  opacity: 0.82;
}

.lang-flag-current {
  display: none;            /* JS sets inline-block once a language is chosen */
  width: 34px;
  height: 22px;
  object-fit: cover;
  border-radius: 0;   /* SQUARE corners */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.lang-trigger[aria-expanded="true"] .lang-caret {
  transform: rotate(180deg);
}


/* ═══════════════════════════════════════════════════════════════════════
   3. DROPDOWN PANEL
   ═══════════════════════════════════════════════════════════════════════ */
.lang-dropdown {
  background: rgba(12, 8, 4, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0;   /* SQUARE corners */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.50);
  overflow: hidden;
  min-width: 136px;
}

.lang-dropdown button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--f-landing);
  font-size: var(--ui-fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-dropdown button:last-child {
  border-bottom: none;
}

.lang-dropdown button:hover {
  background: rgba(212, 178, 106, 0.12);
  color: white;
}

.lang-dropdown button.active {
  background: rgba(212, 178, 106, 0.18);
  color: var(--lp-gold);
}

.lang-dropdown button img {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 0;   /* SQUARE corners */
  flex-shrink: 0;
}

.lang-dropdown button[data-lang="zgh"] {
  font-family: 'Noto Sans Tifinagh', var(--f-landing), sans-serif;
  letter-spacing: 0.08em;
}


/* ═══════════════════════════════════════════════════════════════════════
   4. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .header-lang { top: 15px; right: 15px; }
}
