/* =========================================================================
   LEAD POPUP  —  "free mockup / free consultation" modal
   -------------------------------------------------------------------------
   Image panel on the left, form on the right. Built and injected entirely by
   assets/js/popup.js, so none of this applies until the script decides the
   visitor should see it.
   ========================================================================= */

.mp-scrim {
    position: fixed;
    inset: 0;
    z-index: 2147483000;          /* below the glass cursor, above everything else */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 14, 40, .58);
    backdrop-filter: blur(6px) saturate(140%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    opacity: 0;
    transition: opacity .32s ease;
}

.mp-scrim.is-open { opacity: 1; }

.mp-box {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(920px, 100%);
    max-height: min(640px, calc(100vh - 40px));
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(30, 20, 60, .38);
    transform: translateY(22px) scale(.97);
    opacity: 0;
    transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
}

.mp-scrim.is-open .mp-box {
    transform: none;
    opacity: 1;
}

/* ---- Left: the picture ------------------------------------------------- */
.mp-media {
    position: relative;
    background: #9039e4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    overflow: hidden;
}

/* Soft light behind the artwork so the flat brand colour has some depth. */
.mp-media::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .30), transparent 58%);
}

.mp-media img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 34px rgba(20, 10, 45, .28));
}

.mp-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .38);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.mp-badge span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
    animation: mpPing 1.9s ease-out infinite;
}

@keyframes mpPing {
    70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---- Right: the form --------------------------------------------------- */
.mp-body {
    padding: 34px 34px 30px;
    overflow-y: auto;
}

.mp-eyebrow {
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #9039e4;
    margin-bottom: 10px;
}

.mp-body h2 {
    margin: 0 0 10px;
    font-size: 1.62rem;
    line-height: 1.2;
    font-weight: 800;
    color: #1e1b3a;
    letter-spacing: -.015em;
}

.mp-body h2 em {
    font-style: normal;
    color: #9039e4;
}

.mp-sub {
    margin: 0 0 18px;
    font-size: .9rem;
    line-height: 1.6;
    color: #6f6a8c;
}

/* Offer chooser — two real radios, styled as cards. */
.mp-pick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 16px;
}

.mp-pick label {
    position: relative;
    display: block;
    padding: 12px 12px 12px 34px;
    border: 1.5px solid #e5e0f5;
    border-radius: 12px;
    cursor: pointer;
    font-size: .84rem;
    font-weight: 600;
    color: #4b4666;
    line-height: 1.35;
    transition: border-color .18s, background .18s;
}

.mp-pick label:hover { border-color: #c9b8ee; background: #faf8ff; }

.mp-pick input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mp-pick span::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    width: 15px;
    height: 15px;
    margin-top: -7.5px;
    border: 1.5px solid #cfc6e8;
    border-radius: 50%;
    transition: border-color .18s, box-shadow .18s;
}

/* Plain sibling selection, so the checked dot works without :has(). */
.mp-pick input:checked + span::before {
    border-color: #9039e4;
    box-shadow: inset 0 0 0 4px #9039e4;
}

/* Enhancement only: without :has() the radio dot still shows the state. */
.mp-pick label:has(input:checked) {
    border-color: #9039e4;
    background: rgba(144, 57, 228, .06);
}

/* Keyboard focus must stay visible — these are the real controls. */
.mp-pick input:focus-visible + span {
    outline: 2px solid #9039e4;
    outline-offset: 4px;
    border-radius: 4px;
}

.mp-pick small {
    display: block;
    font-weight: 500;
    font-size: .74rem;
    color: #8b86a6;
    margin-top: 2px;
}

/* Fields */
.mp-f { margin-bottom: 10px; }

.mp-f input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e0f5;
    border-radius: 11px;
    font: inherit;
    font-size: .89rem;
    color: #1e1b3a;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}

.mp-f input::placeholder { color: #a7a2bd; }

.mp-f input:focus {
    outline: none;
    border-color: #9039e4;
    box-shadow: 0 0 0 3px rgba(144, 57, 228, .13);
}

.mp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mp-cta {
    width: 100%;
    margin-top: 6px;
    padding: 14px 20px;
    border: 0;
    border-radius: 12px;
    background: #9039e4;
    color: #fff;
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .12s, box-shadow .18s;
}

.mp-cta:hover:not(:disabled) {
    background: #7a2ec4;
    box-shadow: 0 10px 26px rgba(144, 57, 228, .32);
}

.mp-cta:active:not(:disabled) { transform: translateY(1px); }
.mp-cta:disabled { opacity: .62; cursor: default; }

.mp-fine {
    margin: 11px 0 0;
    font-size: .72rem;
    line-height: 1.55;
    color: #9792ae;
    text-align: center;
}

.mp-fine a { color: #9039e4; }

/* Inline result message */
.mp-msg {
    margin: 12px 0 0;
    padding: 10px 13px;
    border-radius: 10px;
    font-size: .83rem;
    line-height: 1.5;
    display: none;
}

.mp-msg.show { display: block; }
.mp-msg.err  { background: rgba(220, 38, 38, .08); color: #b3261e; }
.mp-msg.ok   { background: rgba(5, 150, 105, .10); color: #05715a; }

/* Success state replaces the form body */
.mp-done {
    text-align: center;
    padding: 22px 6px 6px;
}

.mp-done i {
    display: block;
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(5, 150, 105, .12);
    color: #059669;
    font-size: 1.7rem;
    line-height: 62px;
    font-style: normal;
}

.mp-done h3 { margin: 0 0 8px; font-size: 1.25rem; color: #1e1b3a; }
.mp-done p  { margin: 0; font-size: .9rem; line-height: 1.65; color: #6f6a8c; }

/* Close button */
.mp-x {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(30, 27, 58, .07);
    color: #4b4666;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background .18s, transform .18s;
}

.mp-x:hover { background: rgba(30, 27, 58, .14); transform: rotate(90deg); }
.mp-x:focus-visible { outline: 2px solid #9039e4; outline-offset: 2px; }

/* ---- Narrow screens: drop the image, keep the offer ------------------- */
@media (max-width: 780px) {
    .mp-box { grid-template-columns: 1fr; max-height: calc(100vh - 32px); }
    .mp-media { display: none; }
    .mp-body { padding: 40px 24px 26px; }
    .mp-body h2 { font-size: 1.38rem; }
    .mp-pick { grid-template-columns: 1fr; }
    .mp-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .mp-scrim, .mp-box { transition: none; }
    .mp-badge span { animation: none; }
    .mp-x:hover { transform: none; }
}
