.mpopup[hidden] { display: none !important; }
.mpopup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mpopup__backdrop {
    position: absolute;
    inset: 0;
    background: var(--mpopup-overlay, rgba(0, 0, 0, 0.55));
    cursor: pointer;
}
.mpopup__dialog {
    position: relative;
    background: var(--mpopup-bg, #fff);
    color: var(--mpopup-text, #222);
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    padding: 24px 24px 20px;
    box-sizing: border-box;
    animation: mpopup-pop 180ms ease-out;
}
@keyframes mpopup-pop {
    from { transform: translateY(8px) scale(0.98); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
.mpopup__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    line-height: 28px;
    font-size: 24px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #666;
}
.mpopup__close:hover { color: #000; }
.mpopup__content { font-size: 16px; line-height: 1.5; }
.mpopup__content img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.mpopup__buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}
.mpopup__btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.2;
    transition: filter 120ms ease;
}
.mpopup__btn:hover { filter: brightness(0.92); }
.mpopup__btn--primary {
    background: var(--mpopup-btn1-bg, #2271b1);
    color: var(--mpopup-btn1-text, #fff);
}
.mpopup__btn--secondary {
    background: var(--mpopup-btn2-bg, #f0f0f1);
    color: var(--mpopup-btn2-text, #2c3338);
}
body.mpopup-open { overflow: hidden; }
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
