/* MOLINK language switcher. It inherits the header typography and stays compact. */
.molink-language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 100%;
  color: inherit;
  z-index: 10020;
}

.molink-language-switcher__trigger {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 68px;
  min-height: 44px;
  padding: 8px 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  cursor: pointer;
}

.molink-language-switcher__trigger svg {
  width: 10px;
  height: 6px;
  flex: 0 0 auto;
  transition: transform .18s ease;
}

.molink-language-switcher.is-open .molink-language-switcher__trigger svg {
  transform: rotate(180deg);
}

.molink-language-switcher__trigger:focus-visible,
.molink-language-switcher__option:focus-visible {
  outline: 2px solid #1f5cff;
  outline-offset: 2px;
}

.molink-language-switcher__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  min-width: 178px;
  padding: 8px;
  border: 1px solid rgba(17, 18, 21, .1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 20, 32, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-7px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  pointer-events: none;
}

.molink-language-switcher__menu::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 26px;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(17, 18, 21, .1);
  border-left: 1px solid rgba(17, 18, 21, .1);
  background: #fff;
  transform: rotate(45deg);
}

.molink-language-switcher.is-open .molink-language-switcher__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.molink-language-switcher__option {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #111215 !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
}

.molink-language-switcher__option:hover,
.molink-language-switcher__option:focus,
.molink-language-switcher__option.is-active {
  background: #f1f3f6;
}

.molink-language-switcher__option.is-active::after {
  content: '';
  position: absolute;
  right: 12px;
  width: 7px;
  height: 12px;
  border-right: 2px solid #1f5cff;
  border-bottom: 2px solid #1f5cff;
  transform: rotate(45deg) translateY(-2px);
}

.molink-language-switcher__flag {
  display: inline-flex;
  width: 24px;
  height: 16px;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(17, 18, 21, .12);
}

.molink-language-switcher__flag svg {
  display: block;
  width: 24px;
  height: 16px;
}

/* Hide an English page only for the split second before its cached custom text is translated. */
html[data-molink-lang="en"]:not(.molink-language-ready) body {
  opacity: 0;
}

html.molink-language-ready body {
  opacity: 1;
  transition: opacity .12s ease-out;
}

/* These two labels are generated by the bespoke home design with CSS content. */
html[data-molink-lang="en"] .molink-commerce-hero__copy > span::before {
  content: "From just €14.99." !important;
}

html[data-molink-lang="en"] .molink-commerce-ticker__group::after {
  content: "NEW DESIGNS EVERY WEEK" !important;
}

@media (max-width: 767px) {
  .molink-language-switcher {
    min-width: 56px;
  }

  .molink-language-switcher__trigger {
    min-width: 56px;
    gap: 6px;
    padding-inline: 7px;
  }

  .molink-language-switcher__menu { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .molink-language-switcher__trigger svg,
  .molink-language-switcher__menu,
  html.molink-language-ready body {
    transition: none;
  }
}
