/* =============================================================================
   LANGUAGE SWITCHER - Unified dropdown design, always in navbar
   ============================================================================= */

.lang-switcher {
  position: relative;
  z-index: 1001;
  flex-shrink: 0;
  margin-left: 8px;
}

.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  cursor: pointer;
  color: #D1D5DB;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-switcher-btn:hover {
  border-color: #F59E0B;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.08);
}

.lang-switcher-btn .lang-globe {
  font-size: 1rem;
  line-height: 1;
}

.lang-switcher-btn .lang-code {
  font-size: 0.75rem;
  font-weight: 600;
}

.lang-switcher-btn .lang-arrow {
  font-size: 0.625rem;
  transition: transform 0.2s;
  opacity: 0.7;
}

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

.lang-switcher.open .lang-switcher-btn {
  border-color: #F59E0B;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
}

/* Dropdown panel */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #111827;
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
  z-index: 1010;
}

.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: #D1D5DB;
  border-radius: 6px;
  transition: all 0.15s;
  font-family: inherit;
}

.lang-option:hover {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
}

.lang-option.active {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  font-weight: 600;
}

.lang-option .lang-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.lang-option .lang-name {
  flex: 1;
}

.lang-option .lang-check {
  opacity: 0;
  color: #F59E0B;
  font-size: 0.8rem;
}

.lang-option.active .lang-check {
  opacity: 1;
}

/* Override in navbar context */
.navbar .lang-switcher {
  position: relative;
  top: auto;
  right: auto;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .lang-switcher-btn {
    padding: 5px 8px;
  }
  
  .lang-switcher-btn .lang-code {
    display: none;
  }
  
  .lang-dropdown {
    right: -8px;
    min-width: 140px;
  }
}

/* Dark mode support */
body.dark-mode .lang-dropdown {
  background: #1E2330;
  border-color: #2D3548;
}

body.dark-mode .lang-option {
  color: #D1D5DB;
}

body.dark-mode .lang-option:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
}
