/* SITE POPUP V1
 * Single stylesheet for public + auth + customer popup.
 * Do not create follow-up override files; edit this file directly.
 */

.site-popup-layer[hidden]{
    display:none !important;
}

.site-popup-layer{
    position:fixed;
    inset:0;
    z-index:2147483000;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:24px;

    background:rgba(5,14,28,.68);
    backdrop-filter:blur(5px);
    -webkit-backdrop-filter:blur(5px);

    opacity:0;
    transition:opacity .16s ease;
}

.site-popup-layer.is-open{
    opacity:1;
}

html.site-popup-lock,
html.site-popup-lock body{
    overflow:hidden !important;
}

.site-popup-panel{
    position:relative;

    width:min(720px,calc(100vw - 32px));
    max-height:min(780px,calc(100dvh - 32px));

    overflow:hidden;

    border:1px solid rgba(153,173,205,.30);
    border-radius:22px;

    color:#182943;
    background:#ffffff;

    box-shadow:
        0 30px 90px rgba(4,14,32,.34),
        0 4px 18px rgba(4,14,32,.12);

    transform:translateY(8px) scale(.988);
    transition:transform .18s ease;
}

.site-popup-layer.is-open .site-popup-panel{
    transform:translateY(0) scale(1);
}

.site-popup-close{
    position:absolute;
    z-index:3;

    top:18px;
    right:18px;

    width:44px;
    height:44px;

    display:grid;
    place-items:center;

    padding:0;

    border:1px solid #dce5f1;
    border-radius:12px;

    color:#17263c;
    background:#f5f7fb;

    font:700 25px/1 system-ui,sans-serif;

    cursor:pointer;
}

.site-popup-close:hover{
    border-color:#b9cae2;
    background:#edf2f8;
}

.site-popup-content{
    box-sizing:border-box;

    max-height:min(780px,calc(100dvh - 32px));
    overflow:auto;

    padding:62px 38px 40px;

    color:#182943;

    font-family:inherit;
    font-size:15px;
    line-height:1.65;

    overflow-wrap:anywhere;
}

.site-popup-content > :first-child{
    margin-top:0 !important;
}

.site-popup-content > :last-child{
    margin-bottom:0 !important;
}

.site-popup-content h1,
.site-popup-content h2,
.site-popup-content h3,
.site-popup-content h4,
.site-popup-content h5,
.site-popup-content h6{
    color:inherit;
    line-height:1.2;
}

.site-popup-content img{
    display:block;
    max-width:100%;
    height:auto;
    margin-left:auto;
    margin-right:auto;
    border-radius:12px;
}

.site-popup-content table{
    width:100%;
    border-collapse:collapse;
}

.site-popup-content th,
.site-popup-content td{
    padding:9px 11px;
    border:1px solid #dce5f1;
}

.site-popup-content a{
    color:#4568d5;
    font-weight:700;
}

:is(
    html[data-theme="dark"],
    html.dark,
    html.dark-mode,
    html.theme-dark
) .site-popup-panel{
    border-color:#30455f;
    color:#edf4ff;
    background:#111f32;
    box-shadow:
        0 30px 90px rgba(0,0,0,.50),
        0 4px 18px rgba(0,0,0,.22);
}

:is(
    html[data-theme="dark"],
    html.dark,
    html.dark-mode,
    html.theme-dark
) .site-popup-close{
    border-color:#344b67;
    color:#edf4ff;
    background:#182a40;
}

:is(
    html[data-theme="dark"],
    html.dark,
    html.dark-mode,
    html.theme-dark
) .site-popup-close:hover{
    border-color:#486482;
    background:#20354f;
}

:is(
    html[data-theme="dark"],
    html.dark,
    html.dark-mode,
    html.theme-dark
) .site-popup-content{
    color:#edf4ff;
}

:is(
    html[data-theme="dark"],
    html.dark,
    html.dark-mode,
    html.theme-dark
) .site-popup-content th,
:is(
    html[data-theme="dark"],
    html.dark,
    html.dark-mode,
    html.theme-dark
) .site-popup-content td{
    border-color:#344b67;
}

:is(
    html[data-theme="dark"],
    html.dark,
    html.dark-mode,
    html.theme-dark
) .site-popup-content a{
    color:#7fa0ff;
}

@media(max-width:720px){
    .site-popup-layer{
        padding:12px;
    }

    .site-popup-panel{
        width:calc(100vw - 24px);
        max-height:calc(100dvh - 24px);
        border-radius:17px;
    }

    .site-popup-close{
        top:12px;
        right:12px;

        width:40px;
        height:40px;

        border-radius:10px;
    }

    .site-popup-content{
        max-height:calc(100dvh - 24px);
        padding:62px 22px 28px;
        font-size:14px;
    }
}
