/*
 * Language selection page: a single-column list of languages straight on the HUD stage (eyebrow and heading read White on it).
 * Final states are the resting styles, so reduced motion just removes the animations.
 */
.elx-language {
  --elx-language-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 640px;
  margin: 0 auto;
}

.elx-language__eyebrow {
  margin: 0 0 0.375rem;
  font-size: max(0.875rem, var(--elx-size-min));
  font-weight: var(--elx-weight-semibold);
}

.elx-language__heading {
  margin-bottom: 1.75rem;
}

.elx-language__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.elx-language__list form {
  margin: 0;
}

/* Rows sit on the stage; pressed fills White with Blue content, hover is the same state, desktop only (stage invert). */
.elx-language__row {
  width: 100%;
  min-height: var(--elx-tap-min);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.375rem 0.625rem;
  font-family: var(--elx-font);
  text-align: start;
  color: var(--elx-white);
  background: none;
  border: 0;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease;
  animation: elx-language-pop 600ms var(--elx-language-pop) both;
}
.elx-language__list li:nth-child(2) .elx-language__row {
  animation-delay: 100ms;
}
.elx-language__list li:nth-child(3) .elx-language__row {
  animation-delay: 200ms;
}
/* Every later row arrives together, just after the third, instead of before the first ones. */
.elx-language__list li:nth-child(n + 4) .elx-language__row {
  animation-delay: 300ms;
}
.elx-language__row:active {
  color: var(--elx-blue);
  background: var(--elx-white);
}
@media (hover: hover) {
  .elx-language__row:hover {
    color: var(--elx-blue);
    background: var(--elx-white);
  }
}
.elx-language__row:focus-visible {
  outline: 2px solid var(--elx-white);
  outline-offset: -2px;
}

.elx-language__name {
  flex: 1;
  font-size: var(--elx-h2);
  font-weight: var(--elx-weight-semibold);
  line-height: var(--elx-lh-heading);
}

/* Decorative: the language name carries the meaning. Fixed box so names line up whatever the SVG ratio. */
.elx-language__flag {
  width: 2.625rem;
  height: 1.75rem;
  flex: none;
  object-fit: cover;
  border: 1px solid currentColor;
}

/* The viewBox is cropped to the stroke's horizontal extent (x 186–434 of 600), so the row padding alone sets the
   gap to the edge, as it does for the flag. Width keeps the board's 24px-for-600 scale. */
.elx-language__chevron {
  width: 9.92px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 48;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
[dir="rtl"] .elx-language__chevron {
  transform: scaleX(-1);
}

@keyframes elx-language-pop {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .elx-language__row {
    animation: none;
    transition: none;
  }
}
