/* MP Popup Infos — Frontend Styles */

/* Overlay full-screen */
.mppopup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .3s ease;
    opacity: 0;
    animation: mppopup-fadein .35s ease forwards;
}

@keyframes mppopup-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes mppopup-fadeout {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.mppopup-overlay.mppopup-closing {
    animation: mppopup-fadeout .3s ease forwards;
}

/* Box base */
.mppopup-box {
    position: absolute;
    min-width: 300px;
    max-width: 540px;
    width: calc(100% - 40px);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0,0,0,.25);
    padding: 28px 28px 24px;
    box-sizing: border-box;
    animation: mppopup-slidein .35s cubic-bezier(.16,1,.3,1) forwards;
}

@keyframes mppopup-slidein {
    from { transform: translateY(-18px) scale(.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---- Positions ---- */
/* center = flex default (already centered) */
.mppopup-pos-center { top: 50%; left: 50%; transform: translate(-50%, -50%); animation: none; }

.mppopup-pos-top-left     { top: 24px; left: 24px; }
.mppopup-pos-top-center   { top: 24px; left: 50%; transform: translateX(-50%); }
.mppopup-pos-top-right    { top: 24px; right: 24px; }

.mppopup-pos-center-left  { top: 50%; left: 24px; transform: translateY(-50%); }
.mppopup-pos-center-right { top: 50%; right: 24px; transform: translateY(-50%); }

.mppopup-pos-bottom-left  { bottom: 24px; left: 24px; }
.mppopup-pos-bottom-center{ bottom: 24px; left: 50%; transform: translateX(-50%); }
.mppopup-pos-bottom-right { bottom: 24px; right: 24px; }

/* ---- Close button ---- */
.mppopup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: .5;
    transition: opacity .2s, transform .2s;
    line-height: 1;
    padding: 4px 6px;
    color: inherit;
}
.mppopup-close:hover { opacity: 1; transform: scale(1.15); }

/* ---- Content ---- */
.mppopup-content {
    font-size: 15px;
    line-height: 1.65;
    word-break: break-word;
}
.mppopup-content p     { margin: 0 0 10px; }
.mppopup-content p:last-child { margin-bottom: 0; }
.mppopup-content a     { color: inherit; text-decoration: underline; font-weight: 600; }
.mppopup-content a:hover { opacity: .75; }
.mppopup-content ul,
.mppopup-content ol    { margin: 8px 0 8px 20px; }
.mppopup-content strong { font-weight: 700; }

/* ---- Countdown bar ---- */
.mppopup-countdown {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,.08);
}
.mppopup-countdown-bar {
    background: rgba(0,0,0,.08);
    border-radius: 100px;
    height: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.mppopup-countdown-fill {
    height: 100%;
    border-radius: 100px;
    width: 100%;
    transform-origin: left;
    animation: mppopup-bar linear forwards;
}
@keyframes mppopup-bar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}
.mppopup-countdown-text {
    font-size: 11px;
    opacity: .6;
    display: block;
    text-align: right;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .mppopup-box {
        width: calc(100% - 24px);
        min-width: unset;
        border-radius: 8px;
        padding: 20px 16px;
    }
    .mppopup-pos-top-left,
    .mppopup-pos-top-right  { left: 12px; right: 12px; top: 12px; transform: none; }
    .mppopup-pos-bottom-left,
    .mppopup-pos-bottom-right { left: 12px; right: 12px; bottom: 12px; transform: none; }
    .mppopup-pos-center-left,
    .mppopup-pos-center-right { left: 12px; right: 12px; }
}
