/* muauto.ee — keele-dropdown (ainult tekst, ilma lippudeta)
 * Veebihai oranž aktsent #FF4D00
 */

.muauto-lang {
  position: relative;
  display: inline-block;
  font-family: inherit;
}

.muauto-lang__toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font: inherit;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 4px;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

/* Toggle hover/focus — säilita teksti värv (mis on oranži headeri jaoks valge),
 * lisa väike läbipaistev taust, et anda klikitavuse vihje. Tekst ei tohi
 * muutuda oranžiks, sest header on samuti oranž — tekst kaoks. */
.muauto-lang__toggle:hover,
.muauto-lang__toggle:focus-visible,
.muauto-lang.is-open .muauto-lang__toggle {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  outline: none;
}

.muauto-lang__chevron {
  font-size: 0.7em;
  display: inline-block;
  transition: transform 0.2s ease;
  line-height: 1;
}

.muauto-lang.is-open .muauto-lang__chevron {
  transform: rotate(180deg);
}

.muauto-lang__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  min-width: 90px;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0s linear 0.2s;
  z-index: 1000;
}

.muauto-lang.is-open .muauto-lang__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0s linear 0s;
}

.muauto-lang__item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.muauto-lang__item a {
  display: block;
  padding: 9px 20px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.muauto-lang__item a:hover,
.muauto-lang__item a:focus-visible {
  background-color: #fff5ef;
  color: #FF4D00;
  outline: none;
}

.muauto-lang__item.is-current a {
  color: #FF4D00;
  background-color: #fff5ef;
  font-weight: 600;
}

/* Mobile — anchor to the start instead of right */
@media (max-width: 768px) {
  .muauto-lang__panel {
    right: auto;
    left: 0;
    min-width: 100px;
  }
}
