/* Vetibility locale switcher.
 *
 * This file is loaded statically via <link rel="stylesheet"> so the trigger
 * button has its final dimensions at first paint — no FOUC, no CLS.
 *
 * See Website/assets/js/locale-switcher.js for behavior. The script attaches
 * event handlers and lazy-populates the dropdown menu on first click; the
 * trigger button itself is rendered into the HTML at build time by
 * Website/scripts/install-locale-switcher.js.
 */

.vet-ls {
  position: relative;
  display: inline-block;
  font: 500 .85rem/1.2 Inter, system-ui, sans-serif;
}

.vet-ls__btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: .35rem .65rem;
  color: #1f2937;
  cursor: pointer;
  line-height: 1;
}
.vet-ls__btn:hover { border-color: #9ca3af; }
.vet-ls__btn:focus-visible { outline: 2px solid #045b91; outline-offset: 2px; }
.vet-ls__btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: .85;
}
.vet-ls__btn .vet-ls__code {
  font-weight: 600;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vet-ls__menu {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  min-width: 240px;
  max-height: 60vh;
  overflow: auto;
  padding: .4rem;
  z-index: 60;
  display: none;
}
.vet-ls.is-open .vet-ls__menu { display: block; }

.vet-ls__item {
  display: block;
  padding: .55rem .75rem;
  border-radius: .5rem;
  color: #1f2937;
  text-decoration: none;
  white-space: nowrap;
}
.vet-ls__item:hover { background: #f3f4f6; }
.vet-ls__item.is-current { font-weight: 600; color: #045b91; }
.vet-ls__group-label {
  font-size: .75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .6rem .75rem .25rem;
}

.vet-locale-switcher-mobile .vet-ls { display: block; width: 100%; }
.vet-locale-switcher-mobile .vet-ls__btn {
  width: 100%;
  justify-content: flex-start;
  padding: .65rem 1rem;
  border-radius: .5rem;
}
/* Closed / collapsed: stay in flow under the trigger (display:none until .is-open). */
.vet-locale-switcher-mobile .vet-ls__menu {
  position: static;
  width: 100%;
  min-width: 0;
  margin-top: .4rem;
  box-shadow: none;
  border-color: #e5e7eb;
}
/*
 * Open on mobile: fixed bottom sheet. Inline expansion pinned the list below the last
 * nav item, so most locales sat below the fold inside a 60vh clip — hard to see or scroll.
 */
.vet-locale-switcher-mobile.vet-ls.is-open .vet-ls__menu {
  position: fixed;
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  top: auto;
  width: auto;
  max-height: min(85vh, 32rem);
  margin-top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.16), 0 12px 40px rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  z-index: 100;
  padding: .5rem .55rem;
}
@supports (max-height: 85dvh) {
  .vet-locale-switcher-mobile.vet-ls.is-open .vet-ls__menu {
    max-height: min(85dvh, 32rem);
  }
}
.vet-locale-switcher-mobile .vet-ls__item {
  padding: .75rem 1rem;
  font-size: 1rem;
  line-height: 1.35;
  white-space: normal;
}

.vet-ls__banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #045b91;
  color: #fff;
  padding: .85rem 1.1rem;
  border-radius: 9999px;
  font: 500 .9rem/1.2 Inter, system-ui, sans-serif;
  box-shadow: 0 12px 32px rgba(4, 91, 145, .35);
  display: flex;
  align-items: center;
  gap: .85rem;
  z-index: 70;
  max-width: calc(100vw - 2rem);
}
.vet-ls__banner a { color: #fff; text-decoration: underline; font-weight: 600; }
.vet-ls__banner button {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 .25rem;
  opacity: .85;
}
.vet-ls__banner button:hover { opacity: 1; }

@media (max-width: 480px) {
  .vet-ls__menu { right: auto; left: 0; }
}
