/* Alta's language tab stays on the left edge; PaTo retains navigation and events. */
.pato-switcher.alta-pato-side-tab {
  --alta-tab-ink: var(--alta-aqua-900, #04353b);
  --alta-tab-action: var(--alta-aqua-700, #076e79);
  --alta-tab-paper: var(--alta-paper, #faf8f5);
  --alta-tab-hover: var(--alta-aqua-100, #e4f2f3);
  position: fixed;
  z-index: 99990;
  inset: clamp(7rem, 22vh, 10rem) auto auto 0;
  font-family: Lato, Arial, sans-serif;
}

.pato-switcher.alta-pato-side-tab .pato-switcher__tab-handle,
.pato-switcher.alta-pato-side-tab.is-minimized .pato-switcher__tab-handle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  width: 44px;
  min-height: 102px;
  padding: 14px 10px;
  border: 0;
  border-radius: 0 10px 10px 0;
  background: var(--alta-tab-action);
  color: #fff;
  box-shadow: 3px 4px 12px rgb(4 53 59 / 16%);
  opacity: 1;
  cursor: pointer;
  transition: background-color 160ms ease-out;
}

.pato-switcher.alta-pato-side-tab .pato-switcher__tab-handle:hover,
.pato-switcher.alta-pato-side-tab[data-open="true"] .pato-switcher__tab-handle {
  background: var(--alta-tab-ink);
}

.pato-switcher.alta-pato-side-tab .pato-switcher__tab-flag {
  display: none;
}

.pato-switcher.alta-pato-side-tab .pato-switcher__tab-label,
.pato-switcher.alta-pato-side-tab.is-minimized .pato-switcher__tab-label {
  display: block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  opacity: 1;
}

.pato-switcher.alta-pato-side-tab .pato-switcher__tab-arrow,
.pato-switcher.alta-pato-side-tab.is-minimized .pato-switcher__tab-arrow {
  display: block;
  width: 7px;
  height: 7px;
  border: 0;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 1;
}

.pato-switcher.alta-pato-side-tab[data-open="true"] .pato-switcher__tab-arrow {
  transform: rotate(225deg);
}

.pato-switcher.alta-pato-side-tab .pato-switcher__list {
  inset: 0 auto auto 100%;
  width: 196px;
  min-width: 0;
  max-width: calc(100vw - 52px);
  max-height: min(60vh, 25rem);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--alta-tab-hover);
  border-radius: 0 10px 10px 10px;
  background: var(--alta-tab-paper);
  color: var(--alta-tab-ink);
  box-shadow: 4px 6px 18px rgb(4 53 59 / 14%);
  transform-origin: top left;
  transform: translateX(-4px);
}

.pato-switcher.alta-pato-side-tab[data-open="true"] .pato-switcher__list,
.pato-switcher.alta-pato-side-tab:hover .pato-switcher__list {
  transform: translateX(0);
}

.pato-switcher.alta-pato-side-tab .pato-switcher__item {
  min-height: 44px;
  padding: 10px 12px;
  background: transparent;
  color: var(--alta-tab-ink);
}

.pato-switcher.alta-pato-side-tab .pato-switcher__item:hover {
  background: var(--alta-tab-hover);
}

.pato-switcher.alta-pato-side-tab .pato-switcher__item.is-current {
  background: var(--alta-tab-action);
  color: #fff;
  font-weight: 700;
}

.pato-switcher.alta-pato-side-tab .pato-switcher__tab-handle:focus-visible,
.pato-switcher.alta-pato-side-tab .pato-switcher__item:focus-visible {
  outline: 2px solid var(--alta-tab-ink);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .pato-switcher.alta-pato-side-tab {
    top: 40vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pato-switcher.alta-pato-side-tab .pato-switcher__tab-handle,
  .pato-switcher.alta-pato-side-tab .pato-switcher__tab-arrow,
  .pato-switcher.alta-pato-side-tab .pato-switcher__list {
    transition: none;
  }
}
