/* The site header and the measurement prompt both use the mobile viewport. */
@media (max-width: 1180px) {
  body.menu-open > .ect-metrics-choice {
    display: none;
  }

  .site-header #main-menu {
    overscroll-behavior-y: contain;
  }
}

@media (max-width: 760px) {
  body header.site-header .header-tools {
    gap: 8px;
    max-width: 100%;
    flex-wrap: wrap;
    height: auto;
  }

  body header.site-header .header-tools .language button {
    min-width: 44px;
  }

  footer .footer-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-block: 0;
  }

  footer .contact-phones a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 319px) {
  body header.site-header .header-tools > .button {
    padding-inline: 6px;
  }
}

.ect-metrics-preferences {
  min-height: 44px;
}

.ect-metrics-choice {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.site-header :focus-visible,
footer :focus-visible,
.ect-metrics-choice :focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Keep consecutive ways to book and buy individually tappable when they wrap. */
.booking-service-actions > .button + .maison-inline {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
}

#wardrobe-quantity-offers .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#wardrobe-quantity-offers .button-row > a {
  margin: 0;
  max-width: 100%;
  text-align: center;
}

@media (max-width: 600px) {
  #wardrobe-quantity-offers .button-row > a { width: 100%; }
}

/* These standalone links are visually distinct from links inside paragraphs. */
.contact-layout > aside > .maison-book,
#enquiry > a[href*="privacy"],
.ect-home .launch-announcement > a,
.destination-venue-links > a,
.tc .tc-next > div > .tc-textlink,
.tc .tc-look-actions > .tc-textlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  text-underline-offset: .2em;
}

.contact-layout > aside > .maison-book,
.ect-home .launch-announcement > a {
  text-decoration: underline;
}

.tc .tc-option { min-height: 44px; }
.tc .tc-tabs { gap: .5rem; }

.cap-nav > .cap-route,
.cap-lang > a,
.cap-foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.cap-sign {
  justify-content: center;
  min-height: 44px;
}

.cap-lang > a {
  justify-content: center;
  min-width: 44px;
}

@media (max-width: 680px) {
  .cap-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .cap-head > .cap-sign {
    grid-row: 1;
    grid-column: 1 / -1;
    justify-self: start;
  }

  .cap-head .cap-lang { justify-self: end; }

  .cap-nav > .cap-route {
    white-space: normal;
    line-height: 1.35;
  }

  .cap-nav > .cap-route:nth-child(2) { text-align: right; }

  .cap-lang {
    gap: 2px;
  }
}

@media (max-width: 760px) {
  .split > .split-copy {
    align-self: stretch;
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* The same service selector appears on the dark homepage and the light tailoring page. */
.editorial-hero .ect-tailoring-methods .ect-tailoring-actions .button.ghost {
  background-color: #163832;
  color: #fbf6ec !important;
  border-color: #fbf6ec;
}
.editorial-hero .ect-tailoring-methods .ect-tailoring-actions .button.ghost:is(:hover, :active) {
  background-color: #fbf6ec;
  color: #163832 !important;
  border-color: #fbf6ec;
}
.ect-tailoring-methods .ect-tailoring-actions .button:focus-visible {
  outline: 2px solid #163832;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #fbf6ec;
}
.ect-tailoring-methods .ect-tailoring-actions .button {
  max-width: 100%;
  font-size: 0.875rem;
}
.consultation-more[open] > .button + .maison-inline {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-block-start: 12px;
}
.product-split a[href*="topic=groom-kit"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 0.2em;
}
@media (max-width: 32rem) {
  .editorial-hero .maison-actions,
  .ect-tailoring-methods .ect-tailoring-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .editorial-hero .maison-actions > a,
  .ect-tailoring-methods .ect-tailoring-actions > .button {
    width: 100%;
    min-height: 48px;
    text-align: center;
  }
}
@media (orientation: landscape) and (max-height: 35rem) {
  .shoes-page .shoe-configurator-frame {
    height: 86vh;
    height: 86svh;
  }
}
body.tailoring-page :is(#fabric-and-fit, #consultation-value) .eyebrow {
  color: #70572d;
}
@media (max-width: 32rem) {
  .ect-tailoring-methods .ect-tailoring-actions > .button {
    padding: 12px;
  }
}

.shoes-page .shoe-configurator-header > h2,
.shoes-page .shoe-offer-copy > h2 {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .product-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .product-split > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .product-split .button {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
}
