/* ========================================================================
   Language Switcher — i18n dropdown for 78-locale support
   ======================================================================== */

.lang-switcher {
  position: relative;
}

.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.lang-switcher-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.lang-switcher-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.lang-switcher-btn .lang-switcher-chevron {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.lang-switcher.open .lang-switcher-chevron {
  transform: rotate(180deg);
}

/* Dropdown panel */
.lang-switcher-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  max-height: 320px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 200;
  padding: var(--space-sm);
}

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

/* Search input inside dropdown */
.lang-switcher-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  margin-bottom: var(--space-sm);
  font-family: 'Inter', sans-serif;
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  box-sizing: border-box;
  transition: border-color var(--transition-fast);
}

.lang-switcher-search:focus {
  border-color: var(--coral);
}

.lang-switcher-search::placeholder {
  color: var(--text-muted);
}

/* Individual language option */
.lang-switcher-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-switcher-option:hover {
  background: var(--coral-subtle);
  color: var(--text-primary);
}

.lang-switcher-option.active {
  color: var(--coral);
  font-weight: 600;
}

/* Scrollbar styling for dropdown */
.lang-switcher-dropdown::-webkit-scrollbar {
  width: 4px;
}

.lang-switcher-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.lang-switcher-dropdown::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 2px;
}

.lang-switcher-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .lang-switcher-dropdown {
    width: 200px;
    max-height: 280px;
    right: -0.5rem;
  }
}
