.ns-system-language {
  position: relative;
  flex: 0 0 auto;
  justify-self: end;
  color: #29232a;
}

.ns-system-language[open] {
  z-index: 60;
}

.ns-system-language > .ns-system-language-toggle {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 42px;
  padding: .4rem .65rem;
  list-style: none;
  border: 1px solid #d8d2d9;
  border-radius: .45rem;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: .8125rem;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}

.ns-system-language-toggle::-webkit-details-marker {
  display: none;
}

.ns-system-language-toggle::marker {
  content: "";
}

.ns-system-language .ns-system-language-toggle > span:last-child {
  font-size: .875rem;
}

.ns-system-language[open] .ns-system-language-toggle > span:last-child {
  transform: rotate(180deg);
}

.ns-system-language img {
  display: block;
  flex: 0 0 auto;
  width: 23px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

.ns-system-language > .ns-system-language-options {
  position: absolute;
  inset-block-start: calc(100% + .35rem);
  inset-inline-end: 0;
  width: max-content;
  min-width: min(190px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: min(22rem, calc(100vh - 5rem));
  max-height: min(22rem, calc(100dvh - 5rem));
  margin: 0;
  padding: .35rem;
  overflow: auto;
  list-style: none;
  box-sizing: border-box;
  border: 1px solid #d8d2d9;
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 .65rem 1.6rem #2c203426;
  transform: translateX(var(--ns-system-language-shift, 0));
}

.ns-system-language:not([open]) > .ns-system-language-options {
  display: none;
}

.ns-system-language .ns-system-language-options > li > a {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 42px;
  padding: .45rem .6rem;
  border: 0;
  border-radius: .3rem;
  box-sizing: border-box;
  color: #29232a;
  font-size: .875rem;
  line-height: 1.3;
  text-decoration: none;
  text-transform: none;
}

.ns-system-language .ns-system-language-options > li > a:hover,
.ns-system-language .ns-system-language-options > li > a[aria-current="true"] {
  background: #f5edf2;
  color: #5b304a;
}

.ns-system-language .ns-system-language-options > li > a[aria-current="true"] {
  font-weight: 750;
}

.ns-system-language .ns-system-language-toggle:focus-visible,
.ns-system-language .ns-system-language-options > li > a:focus-visible {
  outline: 2px solid #794765;
  outline-offset: -2px;
}

/* Fit the added control in the landings that use a grid navbar. */
:is(.ns-system-language-header--veterinarians, .ns-system-language-header--wellness, .ns-system-language-header--cannabis) {
  grid-template-columns: minmax(min-content, 1fr) minmax(0, auto) auto auto;
  gap: clamp(.5rem, 1.4vw, 1.5rem);
}

:is(.ns-system-language-header--veterinarians, .ns-system-language-header--wellness, .ns-system-language-header--cannabis) > :is(.nav-links, .navlinks) {
  flex-wrap: wrap;
  column-gap: clamp(.5rem, 1.6vw, 1.5rem);
  row-gap: .2rem;
}

.ns-system-language-header--gym > .nav-links {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: clamp(.55rem, 2.15vw, 2.75rem);
  row-gap: .25rem;
}

@media (max-width: 1050px) {
  .ns-system-language-header--wellness {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

@media (max-width: 1020px) {
  .ns-system-language-header--cannabis {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

@media (max-width: 860px) {
  .ns-system-language-header--veterinarians {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

@media (max-width: 767px) {
  .ns-system-language > .ns-system-language-toggle {
    gap: .32rem;
    padding-inline: .45rem;
    font-size: .75rem;
  }

  .ns-system-language img {
    width: 21px;
    height: 15px;
  }

  .ns-system-language-header--nail-salon {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .ns-system-language-header--cannabis {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 480px) {
  .ns-system-language-header--workforce {
    height: auto;
    min-height: 65px;
    flex-wrap: wrap;
    row-gap: .375rem;
    padding-block: .375rem;
  }

  .ns-system-language-header--workforce > nav {
    top: 100%;
  }
}

@media (max-width: 430px) {
  :is(.ns-system-language-header--veterinarians, .ns-system-language-header--wellness) {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: .5rem;
    row-gap: .375rem;
  }

  :is(.ns-system-language-header--veterinarians, .ns-system-language-header--wellness) > .ns-system-language {
    grid-column: 2;
    grid-row: 1;
  }

  :is(.ns-system-language-header--veterinarians, .ns-system-language-header--wellness) > :is(.nav-cta, .action) {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 359px) {
  .ns-system-language .ns-system-language-toggle > span:nth-of-type(1) {
    display: none;
  }
}


/* Keep the original responsive hero columns usable with longer translations. */
@media (max-width: 700px) {
  :is([data-ns-system-page="pet"], [data-ns-system-page="cannabis"], [data-ns-system-page="nail-salon"]) .hero,
  :is([data-ns-system-page="gym"], [data-ns-system-page="hair-salon"], [data-ns-system-page="veterinarians"], [data-ns-system-page="cannabis"], [data-ns-system-page="nail-salon"]) .hero-grid,
  [data-ns-system-page="sport"] .hero__grid,
  [data-ns-system-page="beauty"] .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-ns-system-page] .hero > *,
  [data-ns-system-page] .hero :is(.hero-grid, .hero__grid, .hero-inner) > * {
    min-inline-size: 0;
  }

  [data-ns-system-page] .hero h1 {
    overflow-wrap: anywhere;
  }

  [data-ns-system-page] .hero :is(.btn, .button) {
    max-inline-size: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
}
