/* =============================================
   Syslix – Language Switcher & Progress Bar
   ============================================= */

/* ── Top progress bar ─────────────────────────────────────────── */
#lang-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #b48c2e 0%, #e8c96a 50%, #b48c2e 100%);
  z-index: 99999;
  opacity: 0;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(228, 196, 88, 0.7);
  pointer-events: none;
}

/* ── Switcher wrapper ─────────────────────────────────────────── */
#lang-switcher {
  position: relative;
  margin-right: 16px;
  user-select: none;
}

/* ── Selected button ─────────────────────────────────────────── */
#lang-selected {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 50px;
  padding: 6px 14px 6px 10px;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.25s, border-color 0.25s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  line-height: 1;
}

#lang-selected:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
}

.lang-flag {
  display: inline-block;
  width: 24px;
  height: 18px;
  border-radius: 2px;
  object-fit: cover;
  vertical-align: middle;
  flex-shrink: 0;
}

.lang-label {
  font-size: 13px;
}

.lang-chevron {
  font-style: normal;
  font-size: 11px;
  opacity: 0.7;
  transition: transform 0.25s;
  margin-left: 2px;
}

/* rotate chevron when open */
#lang-dropdown.open ~ #lang-selected .lang-chevron,
#lang-selected[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown list ────────────────────────────────────────────── */
#lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin: 8px 0 0 0;
  background: #1a1a1a;
  border: none;
  border-radius: 12px;
  min-width: 160px;
  list-style: none;
  padding: 6px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.55);
  z-index: 9999999;
  animation: langDropIn 0.2s ease forwards;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#lang-dropdown.open {
  display: block;
}

@keyframes langDropIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Each option ──────────────────────────────────────────────── */
.lang-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
}

.lang-option:hover {
  background: rgba(255,255,255,0.09);
  color: #fff;
}

.lang-option.active {
  background: rgba(180, 140, 46, 0.18);
  color: #e8c96a;
}

.lang-option.active .lang-flag {
  filter: drop-shadow(0 0 4px rgba(228,196,88,0.6));
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 991px) {
  #lang-switcher {
    margin-right: 8px;
  }
  #lang-selected {
    padding: 5px 10px;
    gap: 5px;
    font-size: 12px;
  }
  .lang-chevron {
    display: none;
  }
}
