/* ============================================================================
   The language switch: EN / SL as two lamps at the end of the switch panel,
   in the panel's own language. On a phone the panel docks at the bottom, so
   the switch gets its own small panel in the top corner instead (.lx-phone),
   which slides away while you scroll down and returns on the way up (lang.js).
   The legal pages have no panel: there it sits in the bar as plain text.
   Colours come from currentColor, so it reads on the home page's panel and on
   the service pages' darker one alike.
   ========================================================================== */

.lx { display: flex; gap: .1rem; font-family: var(--sc-font-mono); }
.lx__opt {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .38rem;
  min-width: 2.1rem; padding: .3rem .3rem .25rem; border-radius: var(--sc-r-sm);
  color: inherit; text-decoration: none; opacity: .62;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 160ms var(--sc-ease-out), background 160ms var(--sc-ease-out);
}
.lx__opt:hover { opacity: 1; background: color-mix(in oklab, currentColor 7%, transparent); }
.lx__opt:active { transform: translateY(1px); }
.lx__lamp {
  width: 5px; height: 5px; border-radius: 50%;
  background: color-mix(in oklab, currentColor 22%, transparent);
  transition: background 200ms var(--sc-ease-out), box-shadow 200ms var(--sc-ease-out);
}
.lx__code { font-size: .56rem; font-weight: 500; letter-spacing: .12em; line-height: 1; text-transform: uppercase; }
.lx__opt[aria-current="true"] { opacity: 1; color: #F0B65E; cursor: default; }
.lx__opt[aria-current="true"]:hover { background: none; }
.lx__opt[aria-current="true"] .lx__lamp { background: #FFC85A; box-shadow: 0 1px 6px 1px rgba(255, 190, 80, .5); }

/* In the panel: after the switches, behind a hairline like the mark's. */
.panel .lx {
  align-self: stretch; align-items: stretch;
  margin-left: .2rem; padding-left: .55rem;
  border-left: 1px solid color-mix(in oklab, currentColor 16%, transparent);
}

/* The phone's own corner. */
.lx-phone { display: none; }
@media (max-width: 860px) {
  .panel .lx { display: none; }
  .lx-phone {
    display: flex; position: fixed; z-index: var(--sc-z-chrome);
    top: calc(.7rem + env(safe-area-inset-top)); right: calc(.7rem + env(safe-area-inset-right));
    padding: .3rem .4rem; border-radius: var(--sc-r-md);
    background: #1F1913; color: #F4ECDF;
    border: 1px solid rgba(244, 236, 223, .14);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
    transition: transform 320ms var(--sc-ease-out), opacity 320ms var(--sc-ease-out), visibility 0s linear 0s;
  }
  .lx-phone .lx__opt { min-width: 2.6rem; min-height: 2.5rem; justify-content: center; }
  .lx-phone .lx__code { font-size: .62rem; }
  .lx-phone.is-away {
    transform: translateY(calc(-100% - 1rem)); opacity: 0; visibility: hidden;
    transition: transform 320ms var(--sc-ease-out), opacity 320ms var(--sc-ease-out), visibility 0s linear 320ms;
  }
  html.is-contact-open .lx-phone { visibility: hidden; }
}
/* It arrives with the panel, wherever the panel waits. */
html.is-entering .lx-phone { opacity: var(--enter-panel, 0); }
html.hall-intro:not(.hall-in) .lx-phone { opacity: 0; visibility: hidden; transition: none; }

/* Legal pages: plain text in the bar, beside Home. */
.legal-bar__end { display: flex; align-items: center; gap: var(--sc-5); }
.legal-bar .lx { gap: 0; align-items: center; color: var(--sc-ink-soft); }
.legal-bar .lx__opt { flex-direction: row; min-width: 0; padding: .55rem .4rem; }
.legal-bar .lx__lamp { display: none; }
.legal-bar .lx__code { font-size: var(--sc-t-xs); letter-spacing: .08em; }

@media (prefers-reduced-motion: reduce) {
  .lx-phone, .lx-phone.is-away { transition: none; }
}
