/* ==============================================================================================
   THE UNLOCK GATE (.wr-ugx-*) AND THE SELLER OPPORTUNITY FAQ (.wr-faq-*)

   Both replaced something louder with something more useful, and the styling follows that.

   THE GATE is a purchase decision about ONE property, so the property comes first and the page
   reads top-down as a single argument: this is the record, this is what a credit buys, here are
   three prices, here is the way out. The gradient is confined to the header; everything below it
   is quiet, because three saturated plan cards competing with a saturated header is how a modal
   ends up looking like a pop-up advert.

   THE PROFESSIONAL CARD is raised, not spotlit. The requirement is explicit that it must not make
   the other two look disabled -- so it gets a border, a lift and a label, and the other cards keep
   full-strength text, full-contrast buttons and the same internal spacing.
   ============================================================================================== */

.wr-ugx-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(12, 26, 58, 0.55);
    backdrop-filter: blur(2px);
}

.wr-ugx {
    position: fixed;
    z-index: 1050;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(820px, calc(100vw - 32px));
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--wr3-surface, #fff);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(12, 26, 58, 0.26), 0 2px 8px rgba(12, 26, 58, 0.08);
    overflow: hidden;
}

.wr-ugx:focus {
    outline: none;
}

/* ---------- Header ---------- */

.wr-ugx__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #1d5ff5 0%, #4b43e8 55%, #6d38dd 100%);
    color: #fff;
}

.wr-ugx__headicon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1rem;
}

.wr-ugx__headtext {
    flex: 1 1 auto;
    min-width: 0;
}

/* Restrained on purpose. The old heading was set at display size and pushed the plan cards below
   the fold, so the modal opened on a sentence instead of on a choice. */
.wr-ugx__head h2 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
    text-wrap: balance;
}

.wr-ugx__head p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
    max-width: 58ch;
}

.wr-ugx__close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}

.wr-ugx__close:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.5);
}

.wr-ugx__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.wr-ugx__close:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---------- Body ---------- */

.wr-ugx__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 24px 22px;
}

/* ---------- The opportunity ---------- */

.wr-ugx-opp {
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--wr3-border, #e4e8f0);
    border-left: 3px solid var(--wr3-blue, #1d5ff5);
    border-radius: 12px;
    background: var(--wr3-surface-2, #f7f9fc);
}

.wr-ugx-opp__market {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--wr3-ink, #0f172a);
}

.wr-ugx-opp__type {
    margin: 3px 0 0;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--wr3-ink-2, #475569);
}

.wr-ugx-opp__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 11px 0 0;
    padding: 0;
    list-style: none;
}

.wr-ugx-opp__facts li {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--wr3-border, #e4e8f0);
    background: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--wr3-ink-2, #475569);
}

.wr-ugx-opp__facts li.is-verified {
    border-color: rgba(21, 128, 61, 0.3);
    background: #dcfce7;
    color: #15803d;
}

/* Amber, not red. A record whose contact has not been verified yet is incomplete, not broken, and
   a red warning on a thing the agent is about to buy reads as "something is wrong with this". */
.wr-ugx-opp__nocontact {
    display: flex;
    gap: 9px;
    margin: 11px 0 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: rgba(224, 163, 46, 0.09);
    border-left: 3px solid #c99a2e;
    font-size: 0.81rem;
    line-height: 1.55;
    color: #7a5410;
}

/* ---------- What a credit buys ---------- */

.wr-ugx-what {
    margin-bottom: 16px;
}

.wr-ugx-what h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--wr3-ink, #0f172a);
}

.wr-ugx-what > p {
    margin: 0 0 11px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--wr3-ink-2, #475569);
    max-width: 68ch;
}

.wr-ugx-what ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wr-ugx-what li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.83rem;
    color: var(--wr3-ink, #0f172a);
}

.wr-ugx-what li i {
    width: 16px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--wr3-blue, #1d5ff5);
}

/* ---------- Billing cycle ---------- */

.wr-ugx-cycle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin: 0 0 14px;
    border-radius: 999px;
    border: 1px solid var(--wr3-border-strong, #d3d9e5);
    background: var(--wr3-surface-2, #f7f9fc);
}

.wr-ugx-cycle button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border: 0;
    border-radius: 999px;
    background: none;
    font: inherit;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--wr3-ink-2, #475569);
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
}

.wr-ugx-cycle button span {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(21, 128, 61, 0.14);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #15803d;
}

.wr-ugx-cycle button.is-active {
    background: #fff;
    color: var(--wr3-ink, #0f172a);
    box-shadow: var(--wr3-shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.08));
}

.wr-ugx-cycle button:focus-visible {
    outline: 2px solid var(--wr3-blue, #1d5ff5);
    outline-offset: 2px;
}

/* ---------- Plans ---------- */

.wr-ugx-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    /* Room for the recommended card's lift and its label, which sits on the top border. */
    padding-top: 10px;
}

.wr-ugx-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 18px 16px 16px;
    border: 1px solid var(--wr3-border, #e4e8f0);
    border-radius: 14px;
    background: #fff;
}

/* Raised, not spotlit: a stronger border, a lift and a shadow. The other two keep full-contrast
   text and buttons, so nothing here reads as disabled. */
.wr-ugx-plan.is-recommended {
    border-color: var(--wr3-blue, #1d5ff5);
    box-shadow: 0 8px 22px rgba(29, 95, 245, 0.16);
    transform: translateY(-6px);
}

.wr-ugx-plan__label {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 3px 11px;
    border-radius: 999px;
    background: var(--wr3-surface-2, #f1f5f9);
    border: 1px solid var(--wr3-border, #e4e8f0);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wr3-ink-2, #475569);
}

.wr-ugx-plan.is-recommended .wr-ugx-plan__label {
    background: var(--wr3-blue, #1d5ff5);
    border-color: var(--wr3-blue, #1d5ff5);
    color: #fff;
}

.wr-ugx-plan h4 {
    margin: 4px 0 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--wr3-ink, #0f172a);
}

.wr-ugx-plan__price {
    margin: 8px 0 0;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.wr-ugx-plan__price strong {
    font-size: 1.55rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--wr3-ink, #0f172a);
}

.wr-ugx-plan__price span {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--wr3-ink-3, #7c8798);
}

.wr-ugx-plan__billed {
    margin: 3px 0 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--wr3-ink-2, #475569);
    min-height: 2.1em;
}

.wr-ugx-plan__features {
    flex: 1 1 auto;
    margin: 12px 0 14px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.wr-ugx-plan__features li {
    display: flex;
    gap: 8px;
    font-size: 0.79rem;
    line-height: 1.45;
    color: var(--wr3-ink, #0f172a);
}

.wr-ugx-plan__features i {
    flex: 0 0 auto;
    margin-top: 3px;
    font-size: 0.68rem;
    color: #2fa66a;
}

.wr-ugx-plan__cta {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.wr-ugx__spin {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: wr-ugx-spin 720ms linear infinite;
}

@keyframes wr-ugx-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .wr-ugx__spin { animation-duration: 2.4s; }
    .wr-ugx-plan.is-recommended { transform: none; }
}

/* ---------- Paid-member branch ---------- */

.wr-ugx-lead {
    margin: 0 0 14px;
    font-size: 0.88rem;
    line-height: 1.62;
    color: var(--wr3-ink-2, #475569);
    max-width: 70ch;
}

.wr-ugx-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wr-ugx-option {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid var(--wr3-border, #e4e8f0);
    border-radius: 13px;
    background: var(--wr3-surface-2, #f7f9fc);
}

.wr-ugx-option h4 {
    margin: 0 0 6px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--wr3-ink, #0f172a);
}

.wr-ugx-option p {
    margin: 0 0 11px;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--wr3-ink-2, #475569);
}

.wr-ugx-packs {
    flex: 1 1 auto;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.82rem;
}

.wr-ugx-packs li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 7px;
    background: #fff;
}

.wr-ugx-packs strong {
    font-variant-numeric: tabular-nums;
}

.wr-ugx-error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 14px 0 0;
    padding: 11px 13px;
    border-radius: 10px;
    border-left: 3px solid #d94b4b;
    background: rgba(217, 75, 75, 0.06);
    font-size: 0.85rem;
    line-height: 1.55;
    color: #8f2f2d;
}

/* ---------- Footer ---------- */

.wr-ugx__foot {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 24px;
    border-top: 1px solid var(--wr3-border, #e4e8f0);
    background: #fff;
}

.wr-ugx__footnote {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.81rem;
    color: var(--wr3-ink-2, #475569);
}

.wr-ugx__footnote i {
    color: var(--wr3-blue, #1d5ff5);
}

.wr-ugx__footbtns {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .wr-ugx-plans {
        grid-template-columns: 1fr;
        padding-top: 12px;
    }

    /* The lift stops making sense in a single column: it just opens a gap above one card. */
    .wr-ugx-plan.is-recommended {
        transform: none;
    }

    .wr-ugx-plan__billed {
        min-height: 0;
    }

    .wr-ugx-options,
    .wr-ugx-what ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .wr-ugx {
        top: 0;
        left: 0;
        transform: none;
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .wr-ugx__head {
        padding: 16px;
        gap: 11px;
    }

    .wr-ugx__head h2 {
        font-size: 1.05rem;
    }

    .wr-ugx__body {
        padding: 14px 16px 18px;
    }

    .wr-ugx__foot {
        padding: 12px 16px;
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .wr-ugx__footbtns {
        margin-left: 0;
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .wr-ugx__footbtns .wr-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .wr-ugx__footnote {
        justify-content: center;
        text-align: center;
    }

    .wr-ugx-cycle {
        display: flex;
        width: 100%;
    }

    .wr-ugx-cycle button {
        flex: 1 1 0;
        justify-content: center;
        min-height: 42px;
    }
}

/* ==============================================================================================
   SELLER OPPORTUNITY FAQ
   ============================================================================================== */

.wr-faq {
    margin-top: 26px;
    border: 1px solid var(--wr3-border, #e4e8f0);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.wr-faq__head {
    padding: 20px 22px 14px;
}

.wr-faq__head h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--wr3-ink, #0f172a);
}

.wr-faq__head p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    color: var(--wr3-ink-2, #475569);
}

.wr-faq__list {
    border-top: 1px solid var(--wr3-border, #eef1f5);
}

.wr-faq__item {
    border-bottom: 1px solid var(--wr3-border, #eef1f5);
}

.wr-faq__q {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.wr-faq__trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 22px;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 130ms ease;
}

.wr-faq__trigger:hover {
    background: var(--wr3-surface-2, #f7f9fc);
}

.wr-faq__trigger:focus-visible {
    outline: 2px solid var(--wr3-blue, #1d5ff5);
    outline-offset: -2px;
}

.wr-faq__icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--wr3-blue-soft, #e8f0ff);
    color: var(--wr3-blue, #1d5ff5);
    font-size: 0.8rem;
}

.wr-faq__item.is-open .wr-faq__icon {
    background: var(--wr3-purple-soft, #f1ecfe);
    color: var(--wr3-purple, #6d38dd);
}

.wr-faq__qtext {
    flex: 1 1 auto;
    font-size: 0.89rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--wr3-ink, #0f172a);
}

.wr-faq__chev {
    flex: 0 0 auto;
    font-size: 0.72rem;
    color: var(--wr3-ink-3, #7c8798);
    transition: transform 180ms ease;
}

.wr-faq__item.is-open .wr-faq__chev {
    transform: rotate(180deg);
}

.wr-faq__a {
    padding: 0 22px 16px 64px;
    animation: wr-faq-open 180ms ease;
}

@keyframes wr-faq-open {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .wr-faq__a { animation: none; }
    .wr-faq__chev { transition: none; }
}

.wr-faq__a p {
    margin: 0 0 9px;
    font-size: 0.86rem;
    line-height: 1.65;
    color: var(--wr3-ink-2, #475569);
    max-width: 74ch;
}

.wr-faq__a p:last-child {
    margin-bottom: 0;
}

.wr-faq__badges {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 0 0 11px;
}

.wr-faq__badges > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 9px;
}

.wr-faq__badges dt {
    flex: 0 0 auto;
}

.wr-faq__badges dd {
    flex: 1 1 260px;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--wr3-ink-2, #475569);
}

.wr-faq__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 22px;
    background: var(--wr3-surface-2, #f7f9fc);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--wr3-ink, #0f172a);
}

@media (max-width: 640px) {
    .wr-faq__trigger {
        padding: 13px 16px;
        gap: 10px;
    }

    .wr-faq__a {
        padding: 0 16px 15px 16px;
    }

    .wr-faq__head,
    .wr-faq__foot {
        padding-left: 16px;
        padding-right: 16px;
    }

    .wr-faq__foot {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
