.mentor-lang-switcher {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.mentor-lang-switcher__dropdown {
  position: relative;
}

.mentor-lang-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0.375rem 0.625rem;
  margin: 0;
  border: 1px solid var(--color-base-200, #e5e5e5);
  border-radius: 0.5rem;
  background: var(--color-base-0, #fff);
  color: var(--color-base-800, #262626);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.mentor-lang-switcher__trigger:hover {
  border-color: var(--color-base-300, #d4d4d4);
  color: var(--color-base-900, #171717);
}

.mentor-lang-switcher__trigger:focus-visible {
  outline: 2px solid var(--color-accent-500, #14b8a6);
  outline-offset: 2px;
}

.mentor-lang-switcher__dropdown.is-open .mentor-lang-switcher__trigger {
  border-color: var(--color-base-300, #d4d4d4);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent-500, #14b8a6) 18%, transparent);
}

.mentor-lang-switcher__flag {
  display: block;
  width: 1.25rem;
  height: 0.9375rem;
  border-radius: 0.125rem;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.mentor-lang-switcher__label {
  white-space: nowrap;
}

.mentor-lang-switcher__chevron {
  display: inline-flex;
  color: var(--color-base-400, #a3a3a3);
  transition: transform 0.15s ease;
}

.mentor-lang-switcher__dropdown.is-open .mentor-lang-switcher__chevron {
  transform: rotate(180deg);
}

.mentor-lang-switcher__menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  z-index: 50;
  min-width: 11.5rem;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  border: 1px solid var(--color-base-200, #e5e5e5);
  border-radius: 0.625rem;
  background: var(--color-base-0, #fff);
  box-shadow:
    0 4px 6px -1px rgba(23, 23, 23, 0.06),
    0 10px 24px -4px rgba(23, 23, 23, 0.1);
}

.mentor-lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--color-base-700, #404040);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 0.12s ease,
    color 0.12s ease;
}

a.mentor-lang-switcher__option:hover,
a.mentor-lang-switcher__option:focus-visible {
  background: var(--color-base-50, #fafafa);
  color: var(--color-base-900, #171717);
  outline: none;
}

a.mentor-lang-switcher__option:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-accent-500, #14b8a6);
}

.mentor-lang-switcher__option.is-current {
  color: var(--color-base-900, #171717);
  background: var(--color-base-50, #fafafa);
  cursor: default;
}

.mentor-lang-switcher__option-label {
  white-space: nowrap;
}

/* Header — compact chrome next to nav CTAs */
.mentor-lang-switcher--header .mentor-lang-switcher__trigger {
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.mentor-lang-switcher--header .mentor-lang-switcher__menu {
  right: 0;
  left: auto;
}

/* Mobile drawer — full-width touch targets */
.mentor-lang-switcher--mobile {
  width: 100%;
}

.mentor-lang-switcher--mobile .mentor-lang-switcher__dropdown {
  width: 100%;
}

.mentor-lang-switcher--mobile .mentor-lang-switcher__trigger {
  width: 100%;
  min-height: 2.75rem;
  justify-content: flex-start;
  font-size: 0.875rem;
}

.mentor-lang-switcher--mobile .mentor-lang-switcher__chevron {
  margin-left: auto;
}

.mentor-lang-switcher--mobile .mentor-lang-switcher__menu {
  left: 0;
  right: 0;
  min-width: 0;
  width: 100%;
}

/* Footer — muted, centered under copyright strip */
.mentor-lang-switcher--footer {
  justify-content: center;
}

.mentor-lang-switcher--footer .mentor-lang-switcher__trigger {
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  border-color: var(--color-base-100, #f5f5f5);
  background: transparent;
  color: var(--color-base-600, #525252);
  font-size: 0.75rem;
}

.mentor-lang-switcher--footer .mentor-lang-switcher__trigger:hover {
  border-color: var(--color-base-200, #e5e5e5);
  color: var(--color-accent-600, #0d9488);
}

.mentor-lang-switcher--footer .mentor-lang-switcher__chevron {
  color: var(--color-base-300, #d4d4d4);
}

.mentor-lang-switcher--footer .mentor-lang-switcher__menu {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  bottom: calc(100% + 0.375rem);
  top: auto;
}

@media (prefers-reduced-motion: reduce) {
  .mentor-lang-switcher__trigger,
  .mentor-lang-switcher__chevron,
  .mentor-lang-switcher__option {
    transition: none;
  }
}
