/*  Language switcher - the floating widget that replaced Weglot's.
 *
 *  Kept in its own file on purpose: css/north-south-transport.css is the
 *  untouched Webflow stylesheet and must stay that way, so that a rebuild
 *  from _raw/ can never be second-guessed. Nothing here selects a Webflow
 *  class, so this file cannot affect the page it floats over.
 *
 *  Same position and shape as the Weglot widget it replaces: bottom-left,
 *  flag + language name + chevron, menu opens upwards.
 */

.i18n-switcher {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9998;              /* below the drivers-wanted popup (99999) */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
    Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
  font-size: 14px;
  line-height: 1;
}

.i18n-switcher__toggle,
.i18n-switcher__option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font: inherit;
  color: #1a1a1a;
  text-decoration: none;
  white-space: nowrap;
}

.i18n-switcher__toggle {
  margin: 0;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.i18n-switcher__toggle:hover,
.i18n-switcher__option:hover {
  background: #f4f4f4;
}

.i18n-switcher__toggle:focus-visible,
.i18n-switcher__option:focus-visible {
  outline: 2px solid #0c4076;
  outline-offset: 2px;
}

.i18n-switcher__flag {
  flex: none;
  width: 21px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}

.i18n-switcher__name {
  flex: 1 1 auto;
  text-align: left;
}

.i18n-switcher__chevron {
  flex: none;
  width: 10px;
  height: 6px;
  color: #6b6b6b;
  transition: transform .15s ease;
}

.i18n-switcher__toggle[aria-expanded="true"] .i18n-switcher__chevron {
  transform: rotate(180deg);
}

/* The menu sits above the button, matching Weglot's upward-opening list. */
.i18n-switcher__menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.i18n-switcher__menu[hidden] {
  display: none;
}

.i18n-switcher__item {
  margin: 0;
  padding: 0;
}

.i18n-switcher__option[aria-current="true"] {
  font-weight: 600;
}

@media (max-width: 479px) {
  .i18n-switcher {
    bottom: 12px;
    left: 12px;
    font-size: 13px;
  }
}

/* Without JavaScript the button cannot open anything, so show the list
   instead of leaving a dead control on the page. */
.i18n-switcher:not([data-i18n-ready]) .i18n-switcher__toggle {
  display: none;
}

.i18n-switcher:not([data-i18n-ready]) .i18n-switcher__menu[hidden] {
  display: block;
  position: static;
}
