/* ============================================
   Optivo Site Popup — native <dialog> component
   Scoped tokens: the campaign violet lives here only,
   so it never leaks into the navy/coral site palette.
   ============================================ */

.opp-modal {
    --opp-modal-violet: #8257e5;
    --opp-modal-violet-soft: #a78bfa;
    --opp-modal-violet-pale: #ede9fe;
    --opp-modal-ink: #0b0b12;
    --opp-modal-muted: #3f3f52;

    position: fixed;
    inset: 0;
    margin: auto;
    width: calc(100% - 32px);
    max-width: 560px;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

.opp-modal::backdrop {
    background: rgba(11, 11, 18, 0.62);
}

.opp-modal[open] {
    animation: opp-modal-in 220ms ease-out;
}

@keyframes opp-modal-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.opp-modal__panel {
    position: relative;
    overflow: hidden;
    padding: 30px 52px 26px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 60px rgba(11, 11, 18, 0.28);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    text-align: center;
}

/* ============================================
   Close button
   ============================================ */
.opp-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    /* Sits over the artwork, so it needs its own solid ground. */
    background: #fff;
    box-shadow: 0 2px 8px rgba(11, 11, 18, 0.22);
    color: var(--opp-modal-ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 150ms ease;
}

.opp-modal__close:hover {
    background: #f1f0f7;
}

/* ============================================
   Decorative artwork (violet waves + halftone art)
   ============================================ */
.opp-modal__decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.opp-modal__decor svg,
.opp-modal__decor span {
    position: absolute;
    display: block;
}

/* Brand assets: violet swooshes, dot grid, halftone megaphone. */
.opp-modal__decor span {
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.opp-modal__decor-swoosh-top {
    top: -72px;
    left: -104px;
    width: 300px;
    height: 237px;
    /* The asset ends in a straight cut; fade it out rather than show the edge. */
    -webkit-mask-image: linear-gradient(to right, #000 52%, transparent 96%);
    mask-image: linear-gradient(to right, #000 52%, transparent 96%);
}

.opp-modal__decor-dots {
    left: 0;
    bottom: 0;
    width: 92px;
    height: 90px;
    opacity: 0.6;
}

.opp-modal__decor-megaphone {
    right: -16px;
    bottom: 0;
    width: 112px;
    height: 140px;
    opacity: 0.88;
}

.opp-modal__decor-envelope {
    top: 6px;
    left: -22px;
    width: 112px;
    transform: rotate(-20deg);
    transform-origin: center;
}

/* ============================================
   Brand lockup
   ============================================ */
.opp-modal__brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    /* Clears the close button in the corner. */
    padding-right: 40px;
    margin-bottom: 26px;
}

.opp-modal__brand-icon {
    width: 34px;
    height: auto;
}

.opp-modal__brand-divider {
    width: 1px;
    height: 26px;
    background: rgba(11, 11, 18, 0.18);
}

.opp-modal__brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.opp-modal__brand-wordmark {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: var(--opp-modal-ink);
}

.opp-modal__brand-sub {
    font-size: 9px;
    font-weight: 400;
    color: var(--opp-modal-muted);
}

.opp-modal__brand-sub strong {
    font-weight: 700;
}

/* ============================================
   Copy
   ============================================ */
.opp-modal__title {
    position: relative;
    z-index: 2;
    margin: 0 0 18px;
    font-size: 31px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.4px;
    color: var(--opp-modal-ink);
}

/* Words wrapped in *asterisks* in the admin field render violet. */
.opp-modal__title em {
    font-style: normal;
    color: var(--opp-modal-violet);
}

.opp-modal__body {
    position: relative;
    z-index: 2;
    margin: 0 0 22px;
}

.opp-modal__body p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--opp-modal-muted);
}

.opp-modal__body p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Form
   ============================================ */
.opp-modal__form {
    position: relative;
    z-index: 2;
}

.opp-modal__input {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 16px;
    padding: 13px 22px;
    border: 1.5px solid var(--opp-modal-violet-soft);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    color: var(--opp-modal-ink);
    text-align: center;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.opp-modal__input::placeholder {
    color: #9a9ab0;
}

.opp-modal__input:focus {
    outline: none;
    border-color: var(--opp-modal-violet);
    box-shadow: 0 0 0 4px var(--opp-modal-violet-pale);
}

.opp-modal__submit {
    display: block;
    width: 100%;
    max-width: 240px;
    margin: 0 auto 20px;
    padding: 14px 32px;
    border: 0;
    border-radius: 999px;
    background: var(--opp-modal-violet);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
}

.opp-modal__submit:hover:not(:disabled) {
    background: #6d43d4;
    transform: translateY(-1px);
}

.opp-modal__submit:disabled {
    opacity: 0.65;
    cursor: default;
}

.opp-modal__legal {
    position: relative;
    max-width: 350px;
    margin: 0 auto;
    padding: 9px 18px;
    border: 1px solid rgba(11, 11, 18, 0.14);
    border-radius: 999px;
    /* Keeps the small print legible where it crosses the artwork. */
    background: rgba(255, 255, 255, 0.86);
    font-size: 10px;
    line-height: 1.45;
    color: var(--opp-modal-muted);
}

.opp-modal__error {
    margin: 0 0 14px;
    font-size: 13px;
    color: #d63638;
}

.opp-modal__success {
    position: relative;
    z-index: 2;
    padding: 20px 0 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--opp-modal-ink);
}

/* partner-hub.css zeroes margins on `.opp-page h1..p`, which outranks the
   single-class rules above. Restore them at matching specificity. */
.opp-modal .opp-modal__title {
    margin: 0 0 18px;
}

.opp-modal .opp-modal__body p {
    margin: 0 0 10px;
}

.opp-modal .opp-modal__body p:last-child {
    margin-bottom: 0;
}

.opp-modal .opp-modal__legal {
    margin: 0 auto;
}

.opp-modal .opp-modal__error {
    margin: 0 0 14px;
}

/* Visually hidden — the theme stylesheet is stripped on plugin templates,
   so the popup can't rely on core's .screen-reader-text. */
.opp-modal__sr,
.opp-modal__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================
   Mobile
   ============================================ */
@media (max-width: 560px) {
    .opp-modal__panel {
        padding: 28px 22px 24px;
        border-radius: 20px;
    }

    .opp-modal__title {
        font-size: 24px;
    }

    .opp-modal__body p {
        font-size: 14px;
    }

    .opp-modal__brand {
        margin-bottom: 22px;
    }

    .opp-modal__decor-envelope {
        width: 104px;
    }

    .opp-modal__decor-swoosh-top {
        top: -24px;
        left: -46px;
        width: 232px;
        height: 184px;
    }

    .opp-modal__decor-dots {
        left: 0;
        bottom: 0;
        width: 76px;
        height: 74px;
    }

    .opp-modal__decor-megaphone {
        right: -26px;
        bottom: -14px;
        width: 84px;
        height: 105px;
        opacity: 0.78;
    }
}

/* Asset paths, resolved relative to this stylesheet. */
.opp-modal__decor-swoosh-top   { background-image: url(../img/opp-swoosh-top.png); }
.opp-modal__decor-dots         { background-image: url(../img/opp-dots.svg); }
.opp-modal__decor-megaphone    { background-image: url(../img/opp-megaphone.webp); }
