.rr-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.rr-modal[style*="display:none"] {
    pointer-events: none;
}

.rr-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 18, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.rr-modal__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(760px, calc(100% - 24px));
    transform: translate(-50%, -50%);
    border-radius: 26px;
    padding: 26px 26px 22px;
    color: #fff;
    background: linear-gradient(90deg, rgba(30,38,52,.96) 0%, rgba(18,24,35,.96) 50%, rgba(29,51,84,.96) 100%);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 20px 60px rgba(0,0,0,.42);
}

.rr-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.05);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}

.rr-modal__close:hover {
    background: rgba(255,255,255,.1);
}

.rr-modal__label {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0;
    border-radius: 999px;
/*    border: 1px solid rgba(255,255,255,.12);*/
/*    background: rgba(255,255,255,.03);*/
    color: rgba(255,255,255,.78);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 14px;
}

.rr-modal__title {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.02;
    font-weight: 800;
    text-transform: uppercase;
    max-width: 620px;
}

.rr-modal__text {
    max-width: 560px;
    color: rgba(255,255,255,.78);
    font-size: 16px;
    line-height: 1.45;
    margin-bottom: 18px;
}

.rr-modal__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.rr-modal__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 118px;
    padding: 18px 14px;
    text-decoration: none;
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.04) 100%);
    border: 1px solid rgba(255,255,255,.11);
    transition: .2s ease;
    text-align: center;
}

.rr-modal__card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,.2);
}

.rr-modal__icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(70, 106, 163, .35);
    border: 1px solid rgba(255,255,255,.12);
}

.rr-modal__icon svg{
    fill:#fff;
    width: 30px;
    height: 30px;
}
.rr-modal__icon-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.95);
    display: block;
}

.rr-modal__card-title {
    display: block;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 500;
}

.rr-modal__phone-box {
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
}

.rr-modal__phone-caption {
    color: rgba(255,255,255,.62);
    font-size: 14px;
    margin-bottom: 6px;
}

.rr-modal__phone {
    color: #d7bf63;
    text-decoration: none;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 600;
}

.rr-modal__phone:hover {
    color: #e6cf76;
}

body.rr-modal-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .rr-modal__dialog {
        width: calc(100% - 16px);
        padding: 20px 16px 16px;
        border-radius: 20px;
    }

    .rr-modal__label {
        margin-bottom: 10px;
        font-size: 12px;
        min-height: 28px;
/*        padding: 0 12px;*/
    }

    .rr-modal__title {
        font-size: 24px;
        line-height: 1.05;
        margin-bottom: 10px;
        max-width: none;
        padding-right: 34px;
    }

    .rr-modal__text {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 14px;
    }

    .rr-modal__grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 14px;
    }

    .rr-modal__card {
        min-height: 72px;
        padding: 12px 14px;
        border-radius: 16px;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    .rr-modal__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .rr-modal__icon-placeholder {
        width: 18px;
        height: 18px;
    }

    .rr-modal__card-title {
        font-size: 16px;
    }

    .rr-modal__phone-box {
        padding: 12px 14px;
        border-radius: 14px;
    }

    .rr-modal__phone {
        font-size: 20px;
    }

    .rr-modal__close {
        width: 38px;
        height: 38px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
}
/* Hram integration: bounded modal on small screens and keyboard focus. */
.rr-modal[hidden] { display: none !important; }
.rr-modal__dialog { box-sizing: border-box; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.rr-modal__label { padding-right: 45px; }
.rr-modal__card:focus-visible, .rr-modal__phone:focus-visible, .rr-modal__close:focus-visible { outline: 3px solid #d7bf63; outline-offset: 3px; }
.rr-contact-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 20px; }
.rr-contact-actions .btn { width: auto; min-height: 48px; }
.rr-contact-actions__phone { font-size: 20px; color: #ac762e; white-space: nowrap; }
@media (max-width: 480px) { .rr-contact-actions { flex-direction: column; align-items: stretch; text-align: center; } .rr-modal__title { font-size: 22px; } }
