/**
 * Language Switcher Component
 */

/* Ensure header stacking context */
.header-wrapper,
sticky-header {
  z-index: 1000;
}

.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 1rem;
  z-index: 9999;
}

.lang-switcher__trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body-family, 'Poppins', sans-serif);
  font-size: 1.3rem;
  color: inherit;
  transition: all 0.2s ease;
}

.lang-switcher__trigger:hover {
  border-color: var(--color-base-accent-1, #e50072);
  background: rgba(229, 0, 114, 0.05);
}

.lang-current-flag {
  font-size: 1.4rem;
  line-height: 1;
}

.lang-current-label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lang-switcher__arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

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

.lang-switcher__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 99999;
  overflow: hidden;
}

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

.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.3rem;
  color: inherit;
  text-align: left;
  transition: background 0.15s ease;
}

.lang-switcher__option:hover {
  background: rgba(0, 0, 0, 0.04);
}

.lang-switcher__option.active {
  background: rgba(229, 0, 114, 0.08);
  color: var(--color-base-accent-1, #e50072);
}

.lang-switcher__option-flag {
  font-size: 1.5rem;
  line-height: 1;
}

.lang-switcher__option-label {
  flex: 1;
}

.lang-switcher__option-check {
  width: 16px;
  height: 16px;
  opacity: 0;
}

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

@media screen and (max-width: 749px) {
  .lang-switcher {
    margin-left: 0.5rem;
  }

  .lang-switcher__trigger {
    padding: 0.4rem 0.6rem;
  }

  .lang-current-label {
    display: none;
  }
}
