/* mes-landing language switcher — shared (index / manual / maintenance) */

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

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 30px;
  padding: 0 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
}

.lang-switch__glyph,
.lang-switch__label,
.lang-switch__code,
.lang-switch__chevron {
  line-height: 1;
}

.lang-switch__glyph--globe {
  display: none;
  font-size: 0.95rem;
}

.lang-switch__glyph--flag {
  display: inline-flex;
  font-size: 0.95rem;
}

.lang-switch__label {
  display: inline;
}

.lang-switch__code {
  display: none;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lang-switch__chevron {
  display: inline-flex;
  font-size: 0.625rem;
  opacity: 0.72;
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  min-width: 10rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 1000;
}

.lang-switch__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}

.lang-switch__option-flag {
  flex: 0 0 auto;
  font-size: 0.95rem;
  line-height: 1;
}

.lang-switch__option-label {
  flex: 1 1 auto;
}

.lang-switch__option:hover,
.lang-switch__menu [aria-selected="true"] .lang-switch__option {
  background: #eff6ff;
}

.lang-switch__btn:focus-visible,
.lang-switch__option:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .lang-switch__btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.65rem;
  }

  .lang-switch__glyph--globe,
  .lang-switch__chevron {
    display: inline-flex;
  }

  .lang-switch__glyph--flag,
  .lang-switch__label {
    display: none;
  }
}

@media (min-width: 641px) {
  .lang-switch__glyph--globe,
  .lang-switch__code {
    display: none;
  }

  .lang-switch__glyph--flag,
  .lang-switch__label,
  .lang-switch__chevron {
    display: inline-flex;
  }
}
