/*
 * Seletor de idioma do OPO Transfer (Porto): o mesmo visual de sempre
 * (iniciais em dourado), só com uma abertura suave.
 * O OPO Rio mantém o seletor anterior (este ficheiro só afeta o header do Porto).
 */

/* O painel passa a existir sempre, invisível, para poder animar a abertura. */
.opo-header:not(.opo-header-rio) .opo-language-options {
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition:
    opacity .22s ease,
    transform .28s cubic-bezier(.22, .61, .36, 1),
    visibility 0s linear .28s;
}

.opo-header:not(.opo-header-rio) .opo-language-options.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition:
    opacity .22s ease,
    transform .28s cubic-bezier(.22, .61, .36, 1),
    visibility 0s;
}

/* As iniciais aparecem uma a uma, com um fade leve. */
.opo-header:not(.opo-header-rio) .opo-language-options a {
  opacity: 0;
  transition: opacity .2s ease, color .2s ease, background-color .2s ease;
}

.opo-header:not(.opo-header-rio) .opo-language-options.is-open a {
  opacity: 1;
}

.opo-header:not(.opo-header-rio) .opo-language-options.is-open a:nth-of-type(1) { transition-delay: .05s, 0s, 0s; }
.opo-header:not(.opo-header-rio) .opo-language-options.is-open a:nth-of-type(2) { transition-delay: .09s, 0s, 0s; }
.opo-header:not(.opo-header-rio) .opo-language-options.is-open a:nth-of-type(3) { transition-delay: .13s, 0s, 0s; }
.opo-header:not(.opo-header-rio) .opo-language-options.is-open a:nth-of-type(4) { transition-delay: .17s, 0s, 0s; }
.opo-header:not(.opo-header-rio) .opo-language-options.is-open a:nth-of-type(5) { transition-delay: .21s, 0s, 0s; }

/* Seta do botão: gira com a mesma suavidade. */
.opo-header:not(.opo-header-rio) .opo-language-toggle i {
  transition: transform .28s cubic-bezier(.22, .61, .36, 1);
}

/* Quem prefere menos movimento: abre sem animação. */
@media (prefers-reduced-motion: reduce) {
  .opo-header:not(.opo-header-rio) .opo-language-options,
  .opo-header:not(.opo-header-rio) .opo-language-options a,
  .opo-header:not(.opo-header-rio) .opo-language-toggle i {
    transition: none !important;
  }
}
