.language-switcher {
  position: relative;
  font-size: 14px;

  @media (max-width: 1100px) {
    display: flex;
    flex-direction: column;
    margin: 0 0 1.5rem;
    font-size: 16px;
  }
}

.language-switcher__trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  cursor: pointer;
}

.language-switcher__trigger:after {
  content: "▼";
  display: block;
  position: relative;
  top: 4px;
  left: -10px;
  transform: translateY(-50%);
  font-size: 3rem;
  font-weight: 500;
  width: 10px;

  @media (max-width: 1100px) {
    top: 8px;
  }
}

.language-switcher__dropdown {
  max-height: 0;
  overflow: hidden;

  @media (max-width: 1100px) {
    display: flex;
    gap: 1rem;
    max-height: 0;
    transition: max-height 0.2s;
  }

  @media (min-width: 1101px) {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 15px;
  }
}

.language-switcher__dropdown[data-open="true"] {
  max-height: none;

  @media (max-width: 1100px) {
    max-height: 30px;
  }
}

.language-switcher__item {
  display: flex;
  font-weight: 500;
  align-items: center;
  gap: 4px;
  cursor: pointer;

  @media (min-width: 1101px) {
    padding: 5px 10px;
    transition: background-color 0.2s;
  }
}

@media (min-width: 1101px) {
  .language-switcher__item:not(.language-switcher--active):hover {
    background-color: var(--ocean-light);
  }
}

.language-switcher__item--english:before,
.language-switcher__item--deutsch:before,
.language-switcher__item--polski:before {
  content: "";
  display: block;
  position: relative;
  height: 12px;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 50%;
  aspect-ratio: 1/1;
}

.language-switcher__item--english:before {
  background-image: url("/themes/therme/assets/flags/en.svg");
}

.language-switcher__item--deutsch:before {
  background-image: url("/themes/therme/assets/flags/de.svg");
}

.language-switcher__item--polski:before {
  background-image: url("/themes/therme/assets/flags/pl.svg");
}
