/* A is unchanged. Set one body[data-pdh-top-test] value through Optimize Next. */
.abTopVariant {
  display: none;
}
body[data-pdh-top-test="fv-area"] .abTopFv--area,
body[data-pdh-top-test="fv-contact"] .abTopFv--contact,
body[data-pdh-top-test="facilities-area"] .abTopFacilitiesArea {
  display: block;
}

.abAreaSearch {
  box-sizing: border-box;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}
.abAreaSearch__heading {
  margin: 0 0 10px;
  color: #1c3f8f;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.abAreaSearch__select {
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  padding: 0 12px;
  border: 1px solid #aabbd8;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 16px;
  line-height: normal;
}
.abAreaSearch__button.btn-01 {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 56px;
  margin: 12px 0 0;
  padding: 0 10px;
  font-size: 15px;
  line-height: 1.5;
}
.abAreaSearch__button span {
  font-size: 22px;
  line-height: 1;
}
.abAreaSearch__note {
  margin: 8px 0 0;
  color: #444;
  font-size: 11px;
  line-height: 1.5;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.abAreaSearch__select:focus-visible,
.abAreaSearch__button:focus-visible,
.abTopFv__actions a:focus-visible {
  outline: 3px solid #1c3f8f;
  outline-offset: 3px;
}
.abTopFacilitiesArea {
  max-width: 460px;
  margin: 24px auto 0;
}
.abTopFacilitiesArea .abAreaSearch__heading {
  font-size: 20px;
}

.abTopFv {
  position: relative;
  z-index: 6;
  opacity: 0;
  visibility: hidden;
}
@keyframes pdh-ab-fv-reveal {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateY(var(--pdh-ab-fv-reveal-offset, 12px));
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
.abTopFv--area .abAreaSearch__select,
.abTopFacilitiesArea .abAreaSearch__select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='m2 2 6 6 6-6' fill='none' stroke='%233671df' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 10px;
}
.abTopFv__copy {
  margin: 0 0 8px;
  color: #1c3f8f;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}
.abTopFv__actions {
  display: flex;
  gap: 8px;
  width: 335px;
  max-width: 100%;
  margin: 0 auto;
}
.abTopFv__actions .btn-01 {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  height: 52px;
  padding: 0 6px;
  font-size: 13px;
  line-height: 1.4;
}
.abTopFv__actions .abTopFv__contact {
  flex: 1.45 1 0;
  border: 1.5px solid #dfaa00;
  background: linear-gradient(180deg, #fffac9 0%, #fbe300 100%);
  color: #111;
}
.abTopFv__actions .abTopFv__facility {
  border: 1.5px solid #3671df;
  background: #fff;
  color: #3671df;
}

@media (prefers-reduced-motion: reduce) {
  .abTopFv {
    --pdh-ab-fv-reveal-duration: 1ms;
    --pdh-ab-fv-reveal-offset: 0px;
  }
}

/* Reserve room only for an active FV variant; keep the existing lower FV CTA. */
body[data-pdh-top-test="fv-area"] .topBanner {
  --pdh-ab-fv-space: 260px;
}
body[data-pdh-top-test="fv-contact"] .topBanner {
  /* +46px preserves 32px more slide clearance after the larger copy/margin. */
  --pdh-ab-fv-space: 166px;
}
body[data-pdh-top-test="fv-area"] .topBanner__catch,
body[data-pdh-top-test="fv-contact"] .topBanner__catch {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
}
@media only screen and (min-width: 992px) {
  /* Start after the final PC catch line: 800ms delay + 1200ms AOS + 100ms pause. */
  .topBanner__catch.hidden-sp:has(> [data-aos="clip-in-right"]:last-child.aos-animate) ~ .abTopFv {
    animation: pdh-ab-fv-reveal var(--pdh-ab-fv-reveal-duration, 600ms) ease-out 2100ms both;
  }
  .abTopFacilitiesArea {
    width: 100%;
    max-width: 520px;
  }
  .abTopFacilitiesArea .abAreaSearch__select {
    height: 60px;
    font-size: 18px;
  }
  .abTopFacilitiesArea .abAreaSearch__button.btn-01 {
    height: 64px;
    margin-top: 16px;
    font-size: 18px;
  }
  body[data-pdh-top-test="fv-area"] .topBanner,
  body[data-pdh-top-test="fv-contact"] .topBanner {
    aspect-ratio: auto;
    min-height: calc(67.12963vw + var(--pdh-ab-fv-space));
  }
  body[data-pdh-top-test="fv-area"] .topBanner__catch,
  body[data-pdh-top-test="fv-contact"] .topBanner__catch {
    margin-left: min(9.83796vw, 170px);
    padding-top: min(12.73148vw, 220px);
  }
  body[data-pdh-top-test="fv-area"] .topBanner__wrap,
  body[data-pdh-top-test="fv-contact"] .topBanner__wrap {
    top: calc(24.30556vw + var(--pdh-ab-fv-space));
    bottom: 7.52315vw;
  }
  body[data-pdh-top-test="fv-area"] .topBannerSwiper,
  body[data-pdh-top-test="fv-contact"] .topBannerSwiper {
    bottom: 7.52315vw;
  }
  .abTopFv {
    margin: 20px 0 0 min(9.83796vw, 170px);
    width: min(26.62037vw, 460px);
  }
  .abTopFv--area {
    width: 460px;
  }
  .abTopFv--area .abAreaSearch__heading {
    font-size: 18px;
  }
  .abTopFv--area .abAreaSearch__button.btn-01 {
    width: 80%;
    margin-inline: auto;
  }
  .abTopFv--contact {
    width: 335px;
  }
}
@media only screen and (max-width: 991px) {
  /* The final SP catch line starts 250ms later than on PC. */
  .topBanner__catch.hidden-pc:has(> [data-aos="clip-in-right"]:last-child.aos-animate) ~ .abTopFv {
    animation: pdh-ab-fv-reveal var(--pdh-ab-fv-reveal-duration, 600ms) ease-out 2350ms both;
  }
  body[data-pdh-top-test="fv-area"] .topBanner .topBannerList,
  body[data-pdh-top-test="fv-area"] .topBanner .topBanner__links,
  body[data-pdh-top-test="fv-contact"] .topBanner .topBannerList,
  body[data-pdh-top-test="fv-contact"] .topBanner .topBanner__links {
    display: none;
  }
  .abTopFacilitiesArea {
    margin-top: 0;
  }
  .abTopFacilitiesArea .abAreaSearch {
    padding-top: 0;
  }
  body[data-pdh-top-test="fv-area"] .topBanner,
  body[data-pdh-top-test="fv-contact"] .topBanner {
    min-height: calc(865px + var(--pdh-ab-fv-space));
  }
  body[data-pdh-top-test="fv-area"] .topBanner__catch,
  body[data-pdh-top-test="fv-contact"] .topBanner__catch {
    padding-top: 120px;
  }
  /* AOS transforms would anchor the absolute stats/CTA to this zero-height wrap. */
  body[data-pdh-top-test="fv-area"] .topBanner__wrap[data-aos],
  body[data-pdh-top-test="fv-contact"] .topBanner__wrap[data-aos] {
    transform: none;
  }
  .abTopFv {
    margin: 20px auto 0;
    width: calc(100% - 40px);
    max-width: 335px;
  }

  /* Both the FV and fixed copies retain their existing links, order and modal. */
  body[data-pdh-top-test="float-contact"] .topBannerLinks,
  body[data-pdh-top-test="float-facility"] .topBannerLinks {
    box-sizing: border-box;
    gap: 6px;
    width: calc(100% - 24px);
    max-width: 500px;
    margin-inline: auto;
  }
  body[data-pdh-top-test="float-contact"] .topBannerLinks .js-ab-float-contact,
  body[data-pdh-top-test="float-contact"] .topBannerLinks .js-ab-float-facility,
  body[data-pdh-top-test="float-facility"] .topBannerLinks .js-ab-float-contact,
  body[data-pdh-top-test="float-facility"] .topBannerLinks .js-ab-float-facility {
    box-sizing: border-box;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    height: 52px;
    padding: 0 4px;
    border: 1.5px solid #3671df;
    background: #fff;
    color: #3671df;
    font-size: clamp(11px, 3.2vw, 14px);
    line-height: 1.35;
    text-wrap: balance;
    white-space: normal;
  }
  body[data-pdh-top-test="float-contact"] .topBannerLinks .js-ab-float-contact {
    flex: 1.6 1 0;
    border-color: #dfaa00;
    background: linear-gradient(180deg, #fffac9 0%, #fbe300 100%);
    color: #111;
  }
  body[data-pdh-top-test="float-facility"] .topBannerLinks .js-ab-float-facility {
    flex: 1.6 1 0;
    background: linear-gradient(214.5deg, #4476d5 66.7%, #083fa8 116.12%);
    color: #fff;
  }
  body[data-pdh-top-test="float-contact"] .topBannerLinks .js-ab-float-tel,
  body[data-pdh-top-test="float-facility"] .topBannerLinks .js-ab-float-tel {
    box-sizing: border-box;
    flex: 0 0 52px;
    width: 52px;
    min-width: 52px;
    height: 52px;
    padding: 0;
    border: 1.5px solid #3671df;
    border-radius: 50%;
    background: #fff;
    color: #3671df;
  }
  body[data-pdh-top-test="float-contact"] .js-ab-float-tel .icon__phone,
  body[data-pdh-top-test="float-facility"] .js-ab-float-tel .icon__phone {
    background-image: url('../images/common/icon_tel_lightBlue.svg');
  }
  body[data-pdh-top-test="float-contact"] .js-ab-float-tel .pdhPhoneHours,
  body[data-pdh-top-test="float-facility"] .js-ab-float-tel .pdhPhoneHours {
    position: absolute;
    bottom: -15px;
    left: 50%;
    padding: 1px 3px;
    border-radius: 4px;
    background: #fff;
    color: #1c3f8f;
    transform: translateX(-50%) scale(0.8);
  }
  body[data-pdh-top-test="float-contact"] .fixedBanner__links.is-fixed,
  body[data-pdh-top-test="float-facility"] .fixedBanner__links.is-fixed {
    bottom: 24px;
  }
}
