/* ============================================================================
   AZ SuperLanguage — glassmorphism language / locale picker
   Enhances a <form>+<select> into a glass dropdown. Dark-surface theme to match
   the AZ sidenav and glass components. Copyright 2026 Tunet Ltd. MIT.
   ============================================================================ */
.az-superlanguage {
  position: relative;
  width: 100%;
  font-family: inherit;
}

/* The native <select> stays in the DOM (it submits / is the no-JS fallback) but
   is hidden once the component enhances it. */
.az-superlanguage .az-superlanguage__native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  pointer-events: none;
}

/* ---- Trigger ------------------------------------------------------------- */
.az-superlanguage__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.az-superlanguage__trigger:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}
.az-superlanguage__trigger:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.6);
  outline-offset: 2px;
}

.az-superlanguage__label {
  flex: 1;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.az-superlanguage__globe {
  font-size: 1rem;
  color: #fbbf24;
}

.az-superlanguage__flag {
  flex-shrink: 0;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.az-superlanguage__caret {
  font-size: 0.7rem;
  opacity: 0.65;
  transition: transform 0.2s ease;
}
.az-superlanguage--open .az-superlanguage__caret {
  transform: rotate(180deg);
}

/* ---- Menu ---------------------------------------------------------------- */
.az-superlanguage__menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 1100;
  padding: 6px;
  background: rgba(20, 35, 60, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.az-superlanguage--open .az-superlanguage__menu {
  display: block;
  animation: az-superlanguage-in 0.14s ease;
}
.az-superlanguage--up .az-superlanguage__menu {
  top: auto;
  bottom: calc(100% + 8px);
}

@keyframes az-superlanguage-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Search -------------------------------------------------------------- */
.az-superlanguage__search {
  position: relative;
  margin-bottom: 6px;
}
.az-superlanguage__search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}
.az-superlanguage__search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #ffffff;
  font-size: 0.85rem;
}
.az-superlanguage__search-input::placeholder { color: rgba(255, 255, 255, 0.4); }
.az-superlanguage__search-input:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.5);
}

/* ---- Options ------------------------------------------------------------- */
.az-superlanguage__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  /* Hide the scrollbar to match the AZ sidenav menu (scroll still works). */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.az-superlanguage__list::-webkit-scrollbar {
  display: none;
}

.az-superlanguage__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.az-superlanguage__option:hover,
.az-superlanguage__option:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  outline: none;
}
.az-superlanguage__option-label { flex: 1; min-width: 0; }

.az-superlanguage__tick {
  font-size: 0.8rem;
  color: #fbbf24;
  opacity: 0;
}
.az-superlanguage__option[aria-selected="true"] {
  color: #fbbf24;
  font-weight: 600;
}
.az-superlanguage__option[aria-selected="true"] .az-superlanguage__tick {
  opacity: 1;
}

/* ---- No-JS fallback select ----------------------------------------------- */
.az-language-switcher__fallback {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.az-language-switcher__fallback option { background: #1e293b; color: #ffffff; }
