
.irt-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.irt-popup.is-visible {
    display: flex;
}

.irt-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--irt-overlay-opacity, .65));
}

.irt-popup-dialog {
    position: relative;
    z-index: 2;
    width: min(100%, var(--irt-popup-width, 600px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
    box-sizing: border-box;
    direction: rtl;
}

.irt-popup-content {
    padding: 28px;
    text-align: center;
}

.irt-popup-title {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.5;
}

.irt-popup-text {
    line-height: 1.9;
}

.irt-popup-text > :first-child {
    margin-top: 0;
}

.irt-popup-text > :last-child {
    margin-bottom: 0;
}

.irt-popup-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto 18px;
    border-radius: 8px;
}

.irt-popup-actions {
    margin-top: 22px;
}

.irt-popup-button {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    background: #2271b1;
    color: #fff !important;
    text-decoration: none !important;
    transition: opacity .15s ease;
}

.irt-popup-button:hover {
    opacity: .88;
}

.irt-popup-close {
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 4;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #555;
    font-size: 30px;
    line-height: 36px;
    cursor: pointer;
}

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

@media (max-width: 600px) {
    .irt-popup {
        padding: 12px;
    }

    .irt-popup-dialog {
        max-height: calc(100vh - 24px);
        border-radius: 10px;
    }

    .irt-popup-content {
        padding: 24px 18px;
    }

    .irt-popup-title {
        font-size: 21px;
    }
}
