/* No.24 and No.26 are mutually exclusive. Optimize Next sets this one body value. */
.pdhAbFacilityCopy,
.pdhAbNearby {
  display: none;
}

body[data-pdh-facility-test="copy"] .facilityDetailEndCta {
  position: relative;
}

body[data-pdh-facility-test="copy"] .pdhAbFacilityCopy {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin: 0 12px 8px;
  color: #1c3f8f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

/* The existing dual buttons start 48px inside their flex container. */
body[data-pdh-facility-test="copy"] .facilityDetailEndCta--dual .pdhAbFacilityCopy {
  top: 48px;
  bottom: auto;
  margin-bottom: 0;
  transform: translateY(calc(-100% - 8px));
}

body[data-pdh-facility-test="nearby"] .pdhAbNearby {
  display: block;
}

.pdhAbNearby {
  box-sizing: border-box;
  width: calc(100% - 40px);
  max-width: 1040px;
  margin: 32px auto 0;
  padding: 24px;
  border-radius: 12px;
  background: #f4f7fb;
  color: #222;
}

.pdhAbNearby__heading {
  margin: 0 0 16px;
  color: #1c3f8f;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.pdhAbNearby__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pdhAbNearby__list > li {
  min-width: 0;
}

.pdhAbNearby__card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 100%;
  box-sizing: border-box;
  padding: 14px 12px;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.pdhAbNearby__card:hover {
  box-shadow: 0 0 0 2px #3671df;
}

.pdhAbNearby__card:focus-visible,
.pdhAbNearby__all:focus-visible {
  outline: 3px solid #3671df;
  outline-offset: 3px;
}

.pdhAbNearby__image {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
}

.pdhAbNearby__body {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pdhAbNearby__name {
  margin: 0 0 4px;
  color: #1c3f8f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.pdhAbNearby__municipality,
.pdhAbNearby__vacancy,
.pdhAbNearby__price,
.pdhAbNearby__conditions {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.pdhAbNearby__price {
  font-weight: 700;
}

.pdhAbNearby__conditions,
.pdhAbNearby__note {
  font-size: 11px;
  line-height: 1.6;
}

.pdhAbNearby__arrow {
  align-self: center;
  color: #3671df;
  font-size: 20px;
}

.pdhAbNearby__note {
  margin: 12px 0 0;
}

.pdhAbNearby__all {
  display: block;
  width: fit-content;
  margin: 16px 0 0 auto;
  color: #3671df;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 991px) {
  .pdhAbNearby {
    max-width: 640px;
    padding: 16px;
  }

  .pdhAbNearby__heading {
    font-size: 14px;
  }

  .pdhAbNearby__list {
    grid-template-columns: minmax(0, 1fr);
  }
}
