/* Professional Fitting Service — Figma node 9292:6561 (1920 × 846). */
.did-you-know[hidden] {
  display: none !important;
}

.fittingService {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  padding: 60px clamp(40px, 10.4167vw, 200px);
  align-items: center;
  column-gap: clamp(16px, 2vw, 40px);
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1fr);
  background: #e0f9f0;
  box-sizing: border-box;
  overflow-x: clip;
}

.fittingService__content {
  display: flex;
  width: 100%;
  max-width: 655px;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 40px 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 52px;
  box-sizing: border-box;
}

.fittingService__stack {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

/* Desktop: icon + title stay separate stack children (gap 24px). */
.fittingService__heading {
  display: contents;
}

.fittingService__icon {
  display: flex;
  width: 64px;
  height: 64px;
  margin: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(54, 54, 53, 0.5);
  border-radius: 16px;
  box-sizing: border-box;
}

.fittingService__icon img {
  width: 32px;
  height: 32px;
}

.fittingService__content h2 {
  margin: 0;
  color: #1f8462;
  font-family: "Noto Sans", sans-serif;
  font-size: clamp(28px, 2.2vw, 36px);
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: -0.2px;
  text-transform: capitalize;
}

.fittingService__titleMobile {
  display: none;
}

.fittingService__copy {
  width: 100%;
  max-width: 655px;
  margin: 0;
  color: #363635;
  font-family: Lato, sans-serif;
  font-size: clamp(17px, 1.2vw, 22px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.52px;
  opacity: 0.9;
}

.fittingService__copy p {
  margin: 0 0 1.2em;
}

.fittingService__copy p:last-child {
  margin-bottom: 0;
}

.fittingService__locations {
  display: grid;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  grid-template-columns: auto auto;
  column-gap: 68px;
  row-gap: 12px;
  justify-content: start;
  list-style: none;
}

.fittingService__locations li {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #363635;
  font-family: Lato, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
}

.fittingService__locations li img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.fittingService__cta {
  display: inline-flex;
  min-height: 62px;
  margin-top: 0;
  padding: 24px 40px;
  align-items: center;
  justify-content: center;
  border: 2px solid #1f8462;
  border-radius: 12px;
  color: #116247;
  font-family: "Noto Sans", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.2px;
  text-decoration: none;
  text-transform: capitalize;
  background: transparent;
  box-sizing: border-box;
}

.fittingService__cta:hover {
  color: #fff;
  text-decoration: none;
  background: #1f8462;
}

/*
 * Map authored at 865×726. Everything uses % of the panel so it scales
 * with the grid cell — no transform:scale() (that kept a 865px layout box
 * and overflow:hidden clipped the legend + map bottom at 125% zoom).
 */
.fittingService__mapPanel {
  position: relative;
  width: 100%;
  max-width: 865px;
  min-width: 0;
  height: auto;
  aspect-ratio: 865 / 726;
  margin-left: auto;
  overflow: visible;
  box-sizing: border-box;
  container-type: inline-size;
  container-name: fitting-map;
}

.fittingService__mapStage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
}

.fittingService__legend {
  position: absolute;
  top: 7.85%; /* 57/726 */
  right: 0;
  z-index: 2;
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 0.5em;
  color: #363635;
  font-family: Lato, sans-serif;
  font-size: clamp(12px, 1.4vw, 22px);
  line-height: 1.2;
  letter-spacing: 0.52px;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Desktop: mapKey is transparent; map-side location pins are mobile-only. */
.fittingService__mapKey {
  display: contents;
}

.fittingService__locations--map {
  display: none;
}

.fittingService__legend > span {
  width: 0.9em;
  height: 0.9em;
  min-width: 10px;
  min-height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #30a67f;
}

/* Flattened Figma maps — shown per breakpoint; pieced SVGs are fallback only. */
.fittingService__mapFlat {
  display: none;
}

/* Desktop / tablet (≥600px): Figma map with city labels (9292:6600). */
@media (min-width: 600px) {
  .fittingService__mapFlat--desktop {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    z-index: 1;
  }

  .fittingService__map {
    display: none !important;
  }

  /* Region callouts stay as HTML (.fittingService__mapLabels). */
}

.fittingService__map {
  position: absolute;
  top: 12.26%; /* 89/726 */
  left: 21.73%; /* 188/865 */
  width: 56.65%; /* 490/865 */
  height: 79.89%; /* 580/726 */
}

.fittingService__mapPiece,
.fittingService__mapPiece img {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
}

.fittingService__mapPiece img {
  inset: 0;
  object-fit: fill;
}

/* Piece positions relative to 490×580 map box. */
.fittingService__mapPiece--nw {
  top: 10.59%;
  left: 33.51%;
  width: 21.88%;
  height: 38.81%;
}

.fittingService__mapPiece--ne {
  top: 0;
  left: 44.76%;
  width: 18.04%;
  height: 23.33%;
}

.fittingService__mapPiece--york {
  top: 19.02%;
  left: 45.18%;
  width: 33.76%;
  height: 24.02%;
}

.fittingService__mapPiece--mid {
  top: 37.9%;
  left: 52.47%;
  width: 29.37%;
  height: 27.95%;
}

.fittingService__mapPiece--sw {
  top: 62.26%;
  left: 5%;
  width: 55.04%;
  height: 37.64%;
}

.fittingService__mapPiece--se {
  top: 61.79%;
  left: 54.76%;
  width: 42.63%;
  height: 25.9%;
}

.fittingService__mapPiece--wales {
  top: 44.45%;
  left: 37.94%;
  width: 25.8%;
  height: 24.1%;
}

.fittingService__mapPiece--east {
  top: 47.88%;
  left: 69.1%;
  width: 30.84%;
  height: 26.66%;
}

/* Region callouts — Figma 9292:6701 / 6734 / 6767 + arrows 6683 / 6689 / 6695.
 * Label + arrow are one flex row so the tip never overlaps the text
 * (live Lato metrics are wider than Figma’s outlined letterforms). */
.fittingService__mapLabels {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fittingService__mapLabel {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #444441;
  font-family: Lato, sans-serif;
  font-size: clamp(8px, 1.15cqw, 10px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  box-sizing: border-box;
}

.fittingService__mapLabelText {
  display: block;
  flex: 0 0 auto;
}

.fittingService__mapLabelArrow {
  position: relative;
  flex: 0 0 auto;
  height: 8px;
  box-sizing: border-box;
}

/* Single 1px shaft — avoids chevron SVG + line stacking as a double stroke. */
.fittingService__mapLabelArrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  right: 0;
  height: 1px;
  background: #444441;
  transform: translateY(-50%);
}

/* Solid left-pointing tip (Figma 9292:6686). */
.fittingService__mapLabelArrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 5px 4px 0;
  border-color: transparent #444441 transparent transparent;
  transform: translateY(-50%);
}

/* Shaft lengths scale with the map panel (Figma 865 artboard). */
.fittingService__mapLabelArrow--ne {
  width: calc(112.1 / 865 * 100cqw);
}

.fittingService__mapLabelArrow--nw {
  width: calc(60.3 / 865 * 100cqw);
}

.fittingService__mapLabelArrow--york {
  width: calc(110.1 / 865 * 100cqw);
}

.fittingService__mapLabel--ne {
  top: 18.47%; /* 134.1 / 726 */
  left: 22.1%; /* 191.15 / 865 */
}

.fittingService__mapLabel--nw {
  top: 28.82%; /* 209.2 / 726 */
  left: 21.69%; /* 187.65 / 865 */
}

.fittingService__mapLabel--york {
  top: 35.44%; /* 257.3 / 726 */
  left: 26.4%; /* 228.35 / 865 */
  align-items: flex-start;
  white-space: normal;
}

.fittingService__mapLabel--york .fittingService__mapLabelText {
  white-space: normal;
  line-height: 1.35;
}

.fittingService__mapLabel--york .fittingService__mapLabelArrow {
  margin-top: 0.15em;
}

/* Mid desktop / 1920×1080 @ 125% zoom (~1536 CSS px). */
@media (min-width: 981px) and (max-width: 1600px) {
  .fittingService {
    padding: 40px clamp(24px, 4vw, 56px);
    column-gap: 20px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }

  .fittingService__content {
    max-width: none;
    padding: 16px 0;
    gap: 32px;
  }

  .fittingService__stack {
    gap: 18px;
  }

  .fittingService__icon {
    width: 52px;
    height: 52px;
  }

  .fittingService__icon img {
    width: 26px;
    height: 26px;
  }

  .fittingService__locations {
    column-gap: 36px;
  }

  .fittingService__cta {
    min-height: 52px;
    padding: 14px 24px;
    font-size: 16px;
  }

  .fittingService__legend {
    font-size: clamp(11px, 1.4vw, 16px);
  }
}

@media (max-width: 980px) {
  .fittingService {
    padding: 56px 40px;
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .fittingService__content {
    width: 100%;
    max-width: none;
    height: auto;
    padding: 0;
    gap: 36px;
  }

  .fittingService__mapPanel {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
  }

  .fittingService__mapLabels {
    display: none;
  }
}

@media (max-width: 599px) {
  .fittingService {
    padding: 48px 24px;
  }

  .fittingService__content h2 {
    font-size: 30px;
    line-height: 38px;
  }

  .fittingService__copy {
    font-size: 17px;
    line-height: 27px;
  }

  .fittingService__locations {
    width: 100%;
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 10px;
  }

  .fittingService__cta {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
  }
}

/* Fitting Policy PDF modal. */
.fittingPolicyModal.popup-overlay,
.fittingPolicyModal[aria-hidden="true"] {
  display: none !important;
}

.fittingPolicyModal[aria-hidden="false"] {
  display: flex !important;
}

.fittingPolicyModal {
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  overscroll-behavior: contain;
  /* Never contribute to page scroll width while closed or open. */
  inset: 0;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

body.fittingPolicyModal-open {
  overflow: hidden;
  touch-action: none;
}

.fittingPolicyModal__box {
  display: flex;
  width: 100%;
  max-width: 1100px;
  height: min(90dvh, 900px);
  max-height: calc(100dvh - 48px);
  flex-direction: column;
  padding: 24px 24px 20px;
  border: 2px solid rgba(180, 180, 179, 0.4);
  border-radius: 24px;
  background: #f5fbf9;
  box-shadow: 0 2px 24px -4px rgba(180, 180, 179, 0.4);
  box-sizing: border-box;
  overflow: hidden;
  touch-action: auto;
}

.fittingPolicyModal__header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.fittingPolicyModal__title {
  margin: 0;
  color: #1f8462;
  font-family: "Noto Sans", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.fittingPolicyModal__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fittingPolicyModal__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1.5px solid #1f8462;
  border-radius: 10px;
  color: #116247;
  font-family: "Noto Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
}

.fittingPolicyModal__download:hover {
  color: #fff;
  background: #1f8462;
  text-decoration: none;
}

.fittingPolicyModal__close,
.fittingPolicyModal__close.popup-close {
  position: static;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.fittingPolicyModal__close img {
  display: block;
  width: 20px;
  height: 20px;
}

.fittingPolicyModal__close:hover {
  background: rgba(31, 132, 98, 0.1);
}

.fittingPolicyModal__viewer {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(180, 180, 179, 0.5);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.fittingPolicyModal__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.fittingPolicyModal__pages {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
  box-sizing: border-box;
}

.fittingPolicyModal__page {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(180, 180, 179, 0.35);
  border-radius: 4px;
  background: #fff;
}

.fittingPolicyModal__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  margin: 0;
  align-items: center;
  justify-content: center;
  color: #116247;
  font-family: "Noto Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  background: rgba(245, 251, 249, 0.92);
}

.fittingPolicyModal__loading[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  body.fittingPolicyModal-open {
    touch-action: manipulation;
  }

  .fittingPolicyModal {
    padding: 12px;
    align-items: stretch;
    overflow: hidden;
  }

  .fittingPolicyModal__box {
    height: calc(100dvh - 24px);
    max-height: none;
    padding: 16px;
    border-radius: 16px;
    overflow: hidden;
  }

  .fittingPolicyModal__title {
    font-size: 20px;
  }

  .fittingPolicyModal__download {
    padding: 7px 10px;
    font-size: 13px;
  }

  /* Native touch scrolling of rendered PDF pages (not Chrome's PDF iframe UI). */
  .fittingPolicyModal__viewer {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .fittingPolicyModal__frame {
    display: none;
  }
}
