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

.pmt-popup {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    padding: 24px;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.pmt-popup-backdrop {
    position: absolute;
    z-index: 0;
    inset: 0;
    background: rgba(9, 18, 24, 0.66);
    opacity: 0;
    transition: opacity 180ms ease;
}

.pmt-popup[data-popup-overlay="0"] .pmt-popup-backdrop {
    display: none;
}

.pmt-popup-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, var(--pmt-popup-width));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    color: #1d2327;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.pmt-popup.is-visible .pmt-popup-backdrop,
.pmt-popup.is-visible .pmt-popup-dialog {
    opacity: 1;
}

.pmt-popup.is-visible .pmt-popup-dialog {
    transform: translateY(0) scale(1);
}

.pmt-popup-content {
    padding: 42px;
    font-size: 16px;
    line-height: 1.6;
}

.pmt-popup-content > :first-child {
    margin-top: 0;
}

.pmt-popup-content > :last-child {
    margin-bottom: 0;
}

.pmt-popup-content h1,
.pmt-popup-content h2,
.pmt-popup-content h3 {
    line-height: 1.25;
}

.pmt-popup-content img {
    max-width: 100%;
    height: auto;
}

.pmt-popup-content .button,
.pmt-popup-content .wp-element-button,
.pmt-popup-content a.button {
    display: inline-flex;
    min-height: 42px;
    padding: 8px 18px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #176b87;
    border: 0;
    border-radius: 5px;
    text-decoration: none;
}

.pmt-popup-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: flex;
    width: 36px;
    height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: currentColor;
    background: rgba(0, 0, 0, 0.07);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 27px;
    line-height: 1;
}

.pmt-popup-close:hover,
.pmt-popup-close:focus-visible {
    background: rgba(0, 0, 0, 0.14);
}

.pmt-popup-theme-dark .pmt-popup-dialog {
    color: #fff;
    background: #17232b;
}

.pmt-popup-theme-dark .pmt-popup-close {
    background: rgba(255, 255, 255, 0.12);
}

.pmt-popup-theme-announcement .pmt-popup-dialog {
    border-top: 7px solid #176b87;
}

.pmt-popup-theme-warning .pmt-popup-dialog {
    color: #4e3904;
    background: #fff8df;
    border-top: 7px solid #d9a514;
}

.pmt-popup-theme-minimal .pmt-popup-dialog {
    border-radius: 3px;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.2);
}

.pmt-popup-position-bottom {
    padding: 0;
    align-items: flex-end;
}

.pmt-popup-position-bottom .pmt-popup-dialog {
    width: 100%;
    max-width: none;
    max-height: 70vh;
    border-radius: 14px 14px 0 0;
    transform: translateY(100%);
}

.pmt-popup-position-bottom.is-visible .pmt-popup-dialog {
    transform: translateY(0);
}

body.pmt-popup-open {
    overflow: hidden;
}

@media screen and (max-width: 600px) {
    .pmt-popup {
        padding: 14px;
    }

    .pmt-popup-dialog {
        max-height: calc(100vh - 28px);
    }

    .pmt-popup-content {
        padding: 38px 24px 28px;
        font-size: 15px;
    }

    .pmt-popup-position-bottom {
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pmt-popup-backdrop,
    .pmt-popup-dialog {
        transition: none;
    }
}
