.peakzy-child-language-switcher {
  position: relative;
}

.peakzy-child-language-switcher__current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111;
  background: transparent;
  border: 0;
  padding: 6px 12px;
  cursor: pointer;
}

.peakzy-child-language-switcher__arrow {
  color: currentColor;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.15s ease;
  transform-origin: center;
}

.peakzy-child-language-switcher.has-no-dropdown .peakzy-child-language-switcher__current {
  cursor: default;
}

.peakzy-child-language-switcher__list {
  position: absolute;
  top: 100%;
  left: 50%;
  right: auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: auto;
  width: max-content;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
}

.peakzy-child-language-switcher:not(.is-ready) .peakzy-child-language-switcher__list {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none;
}

.peakzy-child-language-switcher:not(.is-ready) .peakzy-child-language-switcher__list,
.peakzy-child-language-switcher:not(.is-ready) .peakzy-child-language-switcher__list * {
  transition: none;
  animation: none;
}

.peakzy-child-language-switcher.is-ready.is-open .peakzy-child-language-switcher__list {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.peakzy-child-language-switcher.is-ready.is-open:not(.has-no-dropdown) .peakzy-child-language-switcher__arrow {
  transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .peakzy-child-language-switcher.is-ready:hover .peakzy-child-language-switcher__list,
  .peakzy-child-language-switcher.is-ready:focus-within .peakzy-child-language-switcher__list {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .peakzy-child-language-switcher.is-ready:not(.has-no-dropdown):hover .peakzy-child-language-switcher__arrow,
  .peakzy-child-language-switcher.is-ready:not(.has-no-dropdown):focus-within .peakzy-child-language-switcher__arrow {
    transform: rotate(180deg);
  }
}

.peakzy-child-language-switcher__link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.peakzy-child-language-switcher__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.peakzy-child-language-switcher__flag {
  display: block;
  width: 22px;
  height: auto;
}

.peakzy-child-language-switcher__flag-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 14px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
