/* ==========================================================================
   Language Switcher
   ========================================================================== */

.lang-switcher {
  position: relative;
}

/* Current language button */
.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: var(--radius-pill);
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  cursor: pointer;
  transition: opacity 0.15s;
}

.lang-switcher__btn:hover {
  opacity: 0.8;
}

/* Dropdown list */
.lang-switcher__list {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 160px;
  background-color: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  padding: var(--space-2) 0;
  list-style: none;
  z-index: 101;

  /* Hidden by default — Alpine x-show controls visibility */
  display: none;
}

.lang-switcher__list:not([style*="display: none"]) {
  display: block;
}

.lang-switcher__item {
  list-style: none;
}

/* Option button */
.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
  text-decoration:unset;
}

.lang-switcher__option:hover,
.lang-switcher__option:focus {
  color: var(--color-secondary);
  background-color: var(--color-bg-alt);
}

.lang-switcher__item--active .lang-switcher__option {
  color: var(--color-secondary);
  font-weight: 500;
}

/* Flag */
.lang-switcher__flag {
  flex-shrink: 0;
  width: 20px;
  height: 14px;
  display: inline-flex;
  overflow: hidden;
  border-radius: 2px;
}

.lang-switcher__flag svg {
  width: 100%;
  height: 100%;
}

.lang-switcher__name {
  flex: 1;
}

/* Country picker link (hidden unless plugin active) */
.lang-switcher__country-picker {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
}

.lang-switcher__option--country {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
