/* ========================================
   RPB GUARD REQUEST MODAL
   Vanilla CSS - No external dependencies
======================================== */

.gr-modal,
.gr-modal * {
    box-sizing: border-box;
}

.gr-modal {
    --gr-navy: #14243b;
    --gr-navy2: #203957;
    --gr-gold: #c8a45e;
    --gr-gold-light: #ead8ad;
    --gr-text: #243247;
    --gr-muted: #8290a1;

    position: fixed;
    inset: 0;
    z-index: 999990;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .3s ease, visibility .3s ease;

    font-family: inherit;
    direction: rtl;
}

.gr-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gr-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(8, 18, 32, .78);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.gr-dialog {
    position: relative;

    width: 100%;
    max-width: 680px;
    max-height: min(90vh, 850px);

    display: flex;
    flex-direction: column;

    background: #fff;
    border-radius: 22px;

    overflow: hidden;

    box-shadow:
        0 30px 100px rgba(0, 0, 0, .3),
        0 0 0 1px rgba(255,255,255,.15);

    transform: translateY(35px) scale(.97);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}

.gr-modal.is-open .gr-dialog {
    transform: translateY(0) scale(1);
}

/* Header */

.gr-header {
    position: relative;

    display: flex;
    align-items: center;
    gap: 18px;

    padding: 27px 30px;

    color: #fff;

    background:
        radial-gradient(circle at 90% 0,
        rgba(200,164,94,.22), transparent 40%),
        linear-gradient(120deg, #101d31, #243b59);

    border-bottom: 3px solid var(--gr-gold);
}

.gr-brand-icon {
    flex: 0 0 65px;
    width: 65px;
    height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    color: var(--gr-gold-light);

    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.17);

    font-size: 35px;
}

.gr-eyebrow {
    display: block;

    color: var(--gr-gold-light);

    font-size: 9px;
    letter-spacing: 2px;

    margin-bottom: 7px;
}

.gr-header h2 {
    margin: 0 0 7px;

    font-size: 21px;
    font-weight: 800;

    color: #fff;
}

.gr-header p {
    margin: 0;

    font-size: 12px;
    color: #bdc9d7;
}

.gr-close {
    position: absolute;
    top: 15px;
    left: 17px;

    width: 35px;
    height: 35px;

    border: 1px solid rgba(255,255,255,.2);
    border-radius: 10px;

    color: white;
    background: rgba(255,255,255,.08);

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
    transition: .2s;
}

.gr-close:hover {
    background: #b74b4b;
    border-color: #b74b4b;
}

/* Content */

.gr-content {
    padding: 25px 30px;

    overflow-y: auto;
    overscroll-behavior: contain;
}

.gr-intro {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 15px;

    margin-bottom: 23px;

    border: 1px solid #e9edf2;
    border-radius: 13px;

    background: #f8fafc;
}

.gr-intro-icon {
    flex: 0 0 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--gr-gold);
    background: #f2ead9;

    border-radius: 12px;
    font-size: 23px;
}

.gr-intro strong {
    display: block;
    color: var(--gr-navy);
    font-size: 13px;
}

.gr-intro p {
    margin: 5px 0 0;

    font-size: 11px;
    line-height: 1.9;
    color: var(--gr-muted);
}

/* Section */

.gr-section-title {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 25px 0 16px;

    font-size: 14px;
    font-weight: 800;
    color: var(--gr-navy);
}

.gr-section-title span {
    width: 27px;
    height: 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    color: #fff;
    background: var(--gr-navy);

    font-size: 12px;
}

.gr-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e8edf2;
}

/* Grid */

.gr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.gr-full {
    grid-column: 1 / -1;
}

/* Fields */

.gr-field label {
    display: block;

    margin-bottom: 8px;

    color: #44536a;
    font-size: 12px;
    font-weight: 700;
}

.gr-field label b {
    color: #d64d4d;
}

.gr-input-wrap {
    position: relative;
}

.gr-input-wrap > i {
    position: absolute;

    right: 14px;
    top: 50%;

    transform: translateY(-50%);

    color: #9aa7b6;
    font-size: 17px;

    pointer-events: none;
}

.gr-input-wrap input,
.gr-input-wrap textarea {
    display: block;

    width: 100%;

    padding: 13px 43px 13px 13px;

    border: 1px solid #e1e7ee;
    border-radius: 10px;

    background: #fafbfd;

    color: var(--gr-text);

    font-family: inherit;
    font-size: 12px;

    outline: none;

    transition: .25s;
}

.gr-input-wrap input {
    height: 46px;
}

.gr-input-wrap textarea {
    resize: vertical;
    min-height: 95px;
    line-height: 2;
}

.gr-input-wrap input::placeholder,
.gr-input-wrap textarea::placeholder {
    color: #a9b3c0;
}

.gr-input-wrap input:focus,
.gr-input-wrap textarea:focus {
    border-color: var(--gr-gold);

    background: #fff;

    box-shadow: 0 0 0 3px rgba(200,164,94,.12);
}

.gr-textarea-wrap > i {
    top: 20px;
    transform: none;
}

/* Security */

.gr-security-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-top: 23px;
    padding: 13px;

    border-radius: 10px;

    background: #f7f8fa;

    color: #7b8795;

    font-size: 10px;
    line-height: 2;
}

.gr-security-note i {
    color: var(--gr-gold);
    font-size: 17px;
    flex-shrink: 0;
}

/* Buttons */

.gr-actions {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 20px;
}

.gr-submit {
    flex: 1;

    min-height: 49px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    border: 0;
    border-radius: 11px;

    color: #fff;

    background: linear-gradient(110deg, #172b46, #294565);

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;

    transition: .25s;
}

.gr-submit:hover {
    background: linear-gradient(110deg, #bd9650, #d5b875);

    color: #172b46;

    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(200,164,94,.22);
}

.gr-submit:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
}

.gr-submit-arrow {
    font-size: 16px;
}

.gr-cancel {
    min-height: 49px;
    padding: 0 23px;

    border: 1px solid #e0e5ec;
    border-radius: 11px;

    background: white;
    color: #758195;

    font-family: inherit;
    font-size: 12px;

    cursor: pointer;

    transition: .2s;
}

.gr-cancel:hover {
    background: #f4f5f7;
}

/* Messages */

.gr-message {
    display: none;

    margin-top: 15px;
    padding: 13px;

    border-radius: 10px;

    font-size: 12px;
    line-height: 1.9;
}

.gr-message.is-success {
    display: block;
    background: #eaf7ef;
    color: #217545;
}

.gr-message.is-error {
    display: block;
    background: #fff0f0;
    color: #b33b3b;
}

.gr-message.is-loading {
    display: block;
    background: #edf3fa;
    color: #345779;
}

/* Footer */

.gr-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    margin-top: 22px;
    padding-top: 15px;

    border-top: 1px solid #edf0f3;

    color: #9aa5b2;
    font-size: 10px;
}

.gr-hp {
    position: absolute !important;
    right: -9999px !important;

    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Responsive */

@media (max-width: 600px) {

    .gr-modal {
        padding: 10px;
    }

    .gr-dialog {
        max-height: 94dvh;
        border-radius: 17px;
    }

    .gr-header {
        padding: 22px 19px;
        gap: 12px;
    }

    .gr-brand-icon {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        font-size: 27px;
    }

    .gr-header h2 {
        font-size: 16px;
    }

    .gr-header p {
        font-size: 10px;
    }

    .gr-content {
        padding: 19px 16px;
    }

    .gr-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .gr-full {
        grid-column: auto;
    }

    .gr-actions {
        flex-direction: column;
    }

    .gr-submit,
    .gr-cancel {
        width: 100%;
    }

    .gr-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gr-modal,
    .gr-dialog,
    .gr-submit {
        transition: none !important;
    }
}

body.gr-modal-open {
    overflow: hidden;
}

/* Success Modal */

.gr-toast-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 22, 35, .62);
    backdrop-filter: blur(7px);
    opacity: 0;
    visibility: hidden;
    transition: .3s ease;
}

.gr-toast-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.gr-toast-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 38px 30px 24px;
    text-align: center;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 25px 80px rgba(0,0,0,.22);
    transform: translateY(20px) scale(.96);
    transition: .35s cubic-bezier(.2,.8,.2,1);
    direction: rtl;
}

.gr-toast-overlay.is-visible .gr-toast-box {
    transform: translateY(0) scale(1);
}

.gr-toast-close {
    position: absolute;
    top: 13px;
    left: 15px;
    border: 0;
    background: transparent;
    color: #87909c;
    font-size: 27px;
    cursor: pointer;
}

.gr-toast-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f8ef;
    box-shadow: 0 0 0 9px #f4fbf6;
}

.gr-toast-icon svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: #159957;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
}

.gr-toast-overlay.is-visible .gr-toast-icon svg {
    animation: grCheck .6s .2s ease forwards;
}

@keyframes grCheck {
    to { stroke-dashoffset: 0; }
}

.gr-toast-box h3 {
    margin: 0 0 12px;
    color: #172b43;
    font-size: 21px;
    font-weight: 800;
}

.gr-toast-box p {
    margin: 0 auto 25px;
    max-width: 330px;
    color: #687587;
    font-size: 14px;
    line-height: 2.1;
}

.gr-toast-button {
    width: 100%;
    padding: 13px 20px;
    border: 0;
    border-radius: 11px;
    background: #173b60;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.gr-toast-button:hover {
    background: #245782;
    transform: translateY(-1px);
}

.gr-toast-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1px solid #edf0f3;
    color: #9aa4b0;
    font-size: 10px;
}

.gr-toast-footer span:first-child {
    color: #173b60;
    font-weight: 900;
    letter-spacing: 1px;
}

@media (max-width: 480px) {
    .gr-toast-box {
        padding: 35px 22px 20px;
        border-radius: 18px;
    }
}