/* Shared parts of the partner discount pages (/offers/spacest-promo-code/, /offers/housinganywhere-promo-code/).
   Each page sets its palette on body (.po--spacest / .po--ha) through the --po-* variables. */

.po {
  --po-accent: #e03060;
  --po-accent-ink: #ffffff;
  --po-accent-soft: #ffe3ea;
  --po-deep: #2a0a17;
  --po-paper: #fbf6f1;
  --po-line: rgba(42, 10, 23, 0.14);
  background: var(--po-paper);
}

.po .section-index { color: var(--po-accent); }
.po :focus-visible { outline-color: var(--po-accent); }
.po .promo-nav__cta { background: var(--po-accent); color: var(--po-accent-ink); }
.po .promo-nav__cta:hover { background: var(--po-accent); filter: brightness(1.08); }
.po .promo-nav__cta.is-copied { background: #86efac; color: #052e16; }

/* ---------- Chips (cities) ---------- */
.po-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.po-chips a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.35rem 0.5rem 0.35rem 0.8rem;
  border: 1px solid var(--po-line);
  border-radius: 999px;
  background: #fff;
  color: var(--of-ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.po-chips a:hover { border-color: var(--po-accent); transform: translateY(-1px); }
.po-chip__count {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--po-accent-soft);
  color: var(--po-deep);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.po-chips li[hidden] { display: none; }

/* ---------- Calculator ---------- */
.po-calc { padding: clamp(3.5rem, 8vw, 5.5rem) 0; background: var(--po-deep); color: #f6eef1; }
.po-calc__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.po-calc h2 { font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.03em; color: #fff; }
.po-calc__copy p:not(.section-index) { margin: 0.9rem 0 0; color: rgba(255, 255, 255, 0.72); }
.po-calc .section-index { color: var(--po-accent-soft); }
.po-calc__card {
  padding: 1.75rem;
  border-radius: 24px;
  background: #fff;
  color: var(--of-ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.po-calc__label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--of-muted); }
.po-calc__fee { display: block; margin: 0.35rem 0 1rem; font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-size: 3rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.po-calc__range { width: 100%; accent-color: var(--po-accent); height: 32px; }
.po-calc__scale { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--of-muted); }
.po-calc__result { margin: 1.25rem 0 0; padding: 0.9rem 1rem; border-radius: 14px; background: var(--po-accent-soft); font-weight: 700; }
.po-calc__result strong { font-size: 1.4rem; color: var(--po-deep); }

/* ---------- Live homes ---------- */
.po-homes { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.po-homes__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.po-homes__head .section-head { margin-bottom: 1.75rem; }
.po-homes__cta { margin-bottom: 1.75rem; font-weight: 800; color: var(--po-accent); text-decoration: none; white-space: nowrap; }
.po-homes__cta:hover { text-decoration: underline; }
.po-homes__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.po-home a { display: flex; flex-direction: column; height: 100%; border-radius: 18px; overflow: hidden; background: #fff; color: var(--of-ink); text-decoration: none; border: 1px solid var(--po-line); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.po-home a:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20, 10, 15, 0.14); }
.po-home__media { position: relative; display: block; aspect-ratio: 16 / 11; background: var(--po-accent-soft); }
.po-home__media > img { width: 100%; height: 100%; object-fit: cover; }
.po-home__badge { position: absolute; left: 0.6rem; top: 0.6rem; padding: 0.2rem 0.55rem; border-radius: 999px; background: rgba(255, 255, 255, 0.94); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; color: var(--po-deep); }
.po-home__body { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.85rem 1rem 1rem; }
.po-home__where { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--po-accent); }
.po-home__title { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.po-home__meta { font-size: 0.85rem; color: var(--of-muted); }
.po-home__price { margin-top: auto; padding-top: 0.35rem; font-weight: 800; font-size: 1.05rem; }
.po-home__price small { font-weight: 600; color: var(--of-muted); }

/* ---------- FAQ ---------- */
.po-faq { padding: clamp(3.5rem, 8vw, 5.5rem) 0; background: #fff; }
.po-faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 4rem); }
.po-faq h2 { font-family: var(--fh-font-display, 'Fraunces', Georgia, serif); font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.03em; }
.po-faq__intro p:not(.section-index) { color: var(--of-muted); }
.po-faq__items details { border-bottom: 1px solid var(--po-line); }
.po-faq__items summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}
.po-faq__items summary::-webkit-details-marker { display: none; }
.faq__icon { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--po-accent-soft); }
.faq__icon::before,
.faq__icon::after { content: ''; position: absolute; left: 6px; right: 6px; top: 10px; height: 2px; background: var(--po-deep); transition: transform 0.2s ease; }
.faq__icon::after { transform: rotate(90deg); }
details[open] .faq__icon::after { transform: rotate(0deg); }
.po-faq__items details p { margin: 0 0 1.2rem; color: var(--of-muted); }

/* ---------- Small print ---------- */
.po-fine { padding: 2.5rem 0 3rem; font-size: 0.9rem; color: var(--of-muted); }
.po-fine h2 { font-size: 1rem; font-weight: 800; color: var(--of-ink); margin-bottom: 0.5rem; }
.po-fine ul { margin: 0; padding-left: 1.1rem; }
.po-fine li + li { margin-top: 0.35rem; }

/* ---------- Sticky bar (phones) ---------- */
.po-bar { display: none; }
@media (max-width: 760px) {
  .po { --promo-bar-space: 76px; padding-bottom: 76px; }
  .po-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    display: block;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--po-line);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
  }
  .po-bar__inner { display: flex; gap: 0.5rem; }
  .po-bar__code {
    flex: 1;
    min-height: 52px;
    border: 2px dashed var(--po-accent);
    border-radius: 14px;
    background: var(--po-accent-soft);
    color: var(--po-deep);
    font: 800 1rem/1 var(--fh-font-body, 'DM Sans', sans-serif);
    letter-spacing: 0.04em;
    cursor: pointer;
  }
  .po-bar__code.is-copied { border-style: solid; border-color: var(--of-ok); background: #dcfce7; color: #052e16; }
  .po-bar__open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 1.1rem;
    border-radius: 14px;
    background: var(--po-deep);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }
}

@media (max-width: 980px) {
  .po-homes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .po-calc__inner,
  .po-faq__grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .po-homes__grid { grid-template-columns: 1fr; }
}

/* Provider logo instead of the name, like the app's listing cards (scripts/provider-badge.js). */
.po-home__badge--logo { display: inline-flex; align-items: center; padding: 0.35rem 0.6rem; background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12); }
.po-home__badge--logo img { display: block; height: 16px; width: auto; max-width: 110px; object-fit: contain; }
