/* pool_size archive — styles for shortcode output, section visibility and the contents rail.
 *
 * Every rule is scoped with :is(.fpm-ps, .elementor-editor-active):
 *  - .fpm-ps is the body class added on pool_size archives;
 *  - .elementor-editor-active keeps the styles in the Elementor editor preview.
 * The extra class gives these rules enough specificity to beat Elementor's
 * container (.e-con) and kit (.elementor-kit-N a) rules, which load later.
 */

/* ---------- Palette ----------
   Fixed values (not Elementor globals — this kit still has the default green/black globals).
   Change them here to restyle every block. */
:is(.fpm-ps, .elementor-editor-active) {
  --fpm-ink: #0e2533; /* headings, values */
  --fpm-muted: #52677a; /* body copy, labels */
  --fpm-accent: #0a7bc1; /* site blue: active states, ticks, hover */
  --fpm-tint: #e7f2fa; /* light blue fills */
  --fpm-line: #d6e0e5; /* dividers, borders */
  --fpm-surface: #ffffff;
  --fpm-gap-top: 24px; /* space between the sticky header (or viewport top) and the rail */
  /* --fpm-header-offset is set on <body> by pool-size-archive.js: the height of the
	   Elementor sticky header while it is stuck, 0px otherwise. */
  --fpm-rail-top: calc(var(--fpm-header-offset, 0px) + var(--fpm-gap-top));
}

/* ---------- Section visibility ----------
   Add these classes to the Elementor containers (Advanced → CSS Classes). */
.fpm-ps-no-what .fpm-ps-if-what,
.fpm-ps-no-sections .fpm-ps-if-sections,
.fpm-ps-no-benefits .fpm-ps-if-benefits,
.fpm-ps-no-tips .fpm-ps-if-tips,
.fpm-ps-no-areas .fpm-ps-if-areas,
.fpm-ps-no-faq .fpm-ps-if-faq,
.fpm-ps-no-what-img .fpm-ps-if-what-img {
  display: none !important;
}

/* Anchor offset so headings clear the sticky header and the mobile chip bar */
.fpm-ps
  :is(
    #range,
    #what,
    #benefits,
    #tips,
    #areas,
    #faq,
    #sizes,
    #quote,
    .fpm-ps-split
  ) {
  scroll-margin-top: calc(var(--fpm-header-offset, 0px) + 90px);
}

/* ---------- Contents rail ----------
   Container with class fpm-ps-rail. Elementor containers set position and
   align-self through --position / --align-self, so set both the variables and
   the properties. align-self:start stops the rail stretching to the full
   height of the layout row (a stretched element has nowhere to stick). */
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-rail,
:is(.fpm-ps, .elementor-editor-active) .e-con.fpm-ps-rail {
  --position: sticky;
  position: sticky;
  top: var(--fpm-rail-top);
  --align-self: start;
  align-self: start;
  z-index: 5;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc__title {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fpm-muted);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc li {
  margin: 0;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc a {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid var(--fpm-line);
  color: var(--fpm-muted);
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc a:hover {
  color: var(--fpm-ink);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc a.is-active {
  color: var(--fpm-ink);
  border-left-color: var(--fpm-accent);
  font-weight: 600;
}

@media (max-width: 1024px) {
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-rail,
  :is(.fpm-ps, .elementor-editor-active) .e-con.fpm-ps-rail {
    top: var(--fpm-header-offset, 0px);
    z-index: 20;
    width: 100%;
    background: color-mix(in srgb, var(--fpm-surface) 94%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--fpm-line);
  }
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc__title {
    display: none;
  }
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc ul {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
  }
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc ul::-webkit-scrollbar {
    display: none;
  }
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc li {
    flex: none;
  }
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc a {
    border: 1px solid var(--fpm-line);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--fpm-surface);
  }
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-toc a.is-active {
    background: var(--fpm-ink);
    border-color: var(--fpm-ink);
    color: #fff;
  }
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-rail .fpm-ps-rail__cta {
    display: none;
  }
}

/* ---------- Hero stats ---------- */
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 0;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-stats div {
  display: flex;
  flex-direction: column-reverse;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-stats dt {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--fpm-muted);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-stats dd {
  margin: 0;
  color: var(--fpm-ink);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* ---------- At a glance ---------- */
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-glance {
  border: 1px solid var(--fpm-line);
  border-radius: 10px;
  background: var(--fpm-surface);
  padding: 20px 22px;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-glance__title {
  margin: 0 0 10px;
  color: var(--fpm-ink);
  font-size: 1.05rem;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-glance dl {
  margin: 0;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-glance dl > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  padding-block: 9px;
  border-top: 1px solid var(--fpm-line);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-glance dl > div:first-child {
  border-top: 0;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-glance dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fpm-muted);
  padding-top: 2px;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-glance dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: var(--fpm-ink);
}
@media (max-width: 480px) {
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-glance dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* ---------- Content sections ---------- */
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: start;
  padding-block: 52px;
  border-top: 1px solid var(--fpm-line);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-split--left {
  grid-template-columns: 340px minmax(0, 1fr);
}
:is(.fpm-ps, .elementor-editor-active)
  .fpm-ps-split--left
  .fpm-ps-split__media {
  order: -1;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-split--none {
  grid-template-columns: minmax(0, 1fr);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-split h2 {
  margin: 0 0 14px;
  color: var(--fpm-ink);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-split__media {
  margin: 0;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-split__img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-prose {
  max-width: 68ch;
  color: var(--fpm-muted);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-prose > *:last-child {
  margin-bottom: 0;
}
@media (max-width: 767px) {
  :is(.fpm-ps, .elementor-editor-active)
    :is(.fpm-ps-split, .fpm-ps-split--left) {
    grid-template-columns: minmax(0, 1fr);
  }
  :is(.fpm-ps, .elementor-editor-active)
    .fpm-ps-split--left
    .fpm-ps-split__media {
    order: 0;
  }
}

/* ---------- Benefits ---------- */
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px 32px;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-benefits li {
  display: grid;
  gap: 6px;
  align-content: start;
  margin: 0;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-benefits h3 {
  margin: 0;
  color: var(--fpm-ink);
  font-size: 1.08rem;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-benefits p {
  margin: 0;
  color: var(--fpm-muted);
  font-size: 0.95rem;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-benefits__icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--fpm-tint);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-benefits__icon--tick {
  display: grid;
  place-items: center;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-benefits__icon--tick::before {
  content: "✓";
  color: var(--fpm-accent);
  font-weight: 800;
}

/* ---------- Tips ---------- */
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-tips {
  margin: 0;
  border-top: 1px solid var(--fpm-line);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-tips > div {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  padding-block: 16px;
  border-bottom: 1px solid var(--fpm-line);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-tips dt {
  font-weight: 400;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-tips dt h3 {
  margin: 0;
  color: var(--fpm-ink);
  font-size: 1.05rem;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-tips dd {
  margin: 0;
  color: var(--fpm-muted);
}
@media (max-width: 767px) {
  :is(.fpm-ps, .elementor-editor-active) .fpm-ps-tips > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

/* ---------- Suburbs ---------- */
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-suburbs {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 4 140px;
  column-gap: 20px;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-suburbs li {
  padding-block: 3px;
  margin: 0;
  color: var(--fpm-muted);
  break-inside: avoid;
}

/* ---------- FAQs ---------- */
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-faqs details {
  border-bottom: 1px solid var(--fpm-line);
  padding-block: 14px;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-faqs summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
:is(.fpm-ps, .elementor-editor-active)
  .fpm-ps-faqs
  summary::-webkit-details-marker {
  display: none;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-faqs summary h3 {
  margin: 0;
  color: var(--fpm-ink);
  font-size: 1.02rem;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-faqs summary::after {
  content: "+";
  color: var(--fpm-accent);
  font-weight: 700;
}
:is(.fpm-ps, .elementor-editor-active)
  .fpm-ps-faqs
  details[open]
  summary::after {
  content: "–";
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-faqs .fpm-ps-prose {
  margin-top: 10px;
}

/* ---------- Other sizes ---------- */
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-sizes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-sizes li {
  margin: 0;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-sizes a {
  display: grid;
  gap: 2px;
  padding: 18px;
  border: 1px solid var(--fpm-line);
  border-radius: 10px;
  background: var(--fpm-surface);
  color: var(--fpm-ink);
  text-decoration: none;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-sizes a:hover {
  border-color: var(--fpm-accent);
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-sizes a[aria-current="page"] {
  background: var(--fpm-ink);
  border-color: var(--fpm-ink);
  color: #fff;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-sizes__range {
  font-size: 0.8rem;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}
:is(.fpm-ps, .elementor-editor-active) .fpm-ps-sizes__name {
  font-weight: 700;
  font-size: 1.05rem;
}

/* ---------- Focus ---------- */
:is(.fpm-ps, .elementor-editor-active)
  :is(.fpm-ps-toc a, .fpm-ps-sizes a, .fpm-ps-faqs summary):focus-visible {
  outline: 3px solid var(--fpm-accent);
  outline-offset: 2px;
}
