.crm-demo-modal,
.crm-demo-modal * {
    box-sizing: border-box;
}

.crm-demo-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999999;
    direction: rtl;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.crm-demo-modal.active {
    display: flex;
}

.crm-demo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 30, 60, .55);
    backdrop-filter: blur(5px);
}

.crm-demo-box {
    position: relative;
    z-index: 2;
    width: 420px;
    max-width: calc(100% - 40px);
    max-height: calc(100vh - 30px);
    max-height: calc(100dvh - 30px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 25px;
    padding: 35px 30px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .18);
    animation: demoShow .35s ease;
}

@keyframes demoShow {
    from { opacity: 0; transform: translateY(30px) scale(.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.crm-demo-close {
            position: absolute;
            top: 18px;
            right: 18px;
            width: 38px;
            height: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            border: none;
            border-radius: 50%;
            background: #f1f4f8;
            color: #173d75;
            font-size: 25px;
            font-weight: 600;
            line-height: 1;
            cursor: pointer;
            z-index: 5;
}

.crm-demo-icon {
    width: 70px;
    height: 70px;
    margin: auto;
    border-radius: 50%;
    background: #173d75;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.crm-demo-box h3 {
    color: #173d75;
    font-size: 22px;
    margin: 20px 0 8px;
}

.crm-demo-box p {
    color: #666;
    line-height: 2;
}

.crm-demo-box input {
    width: 100%;
    height: 48px;
    margin: 8px 0;
    padding: 0 18px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-family: Ravi,Tahoma, sans-serif;
    text-align: right;
    outline: none;
}

.crm-demo-box input:focus {
    border-color: #1684df;
}

.crm-demo-box button[type=submit] {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 30px;
    background: #1684df;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    margin-top: 15px;
}

.crm-demo-box button[type=submit]:disabled {
    opacity: .65;
    cursor: wait;
}

#crm-demo-message {
    min-height: 24px;
    margin-top: 14px;
    line-height: 1.9;
    white-space: pre-line;
    font-size: 14px;
}

#crm-demo-message.success {
    color: #14833b;
}

#crm-demo-message.error {
    color: #c62828;
}

.crm-demo-hp {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* فونت کل مودال */
.crm-demo-modal,
.crm-demo-modal input,
.crm-demo-modal textarea,
.crm-demo-modal select {
    font-family: Ravi, Tahoma, sans-serif;
}

/* بهتره input فونت والد رو دقیقاً بگیره */
.crm-demo-box input {
    width: 100%;
    height: 48px;
    margin: 8px 0;
    padding: 0 18px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font: inherit;
    font-family: Ravi, Tahoma, sans-serif;
    font-size: 14px;
    text-align: right;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.crm-demo-box input::placeholder {
    font-family: Ravi, Tahoma, sans-serif;
}

/* دکمه بستن دسکتاپ */
.crm-demo-close {
    position: absolute;
    top: 18px;
    right: 18px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: none;
    border-radius: 50%;

    background: #f1f4f8;
    color: #173d75;

    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;
    z-index: 5;
}


/* موبایل */
@media (max-width: 600px) {

    .crm-demo-box {
        width: calc(100% - 30px);
        max-width: 420px;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        padding: 35px 22px 30px;
        border-radius: 20px;
    }

    .crm-demo-close {
        top: 15px;
        right: auto;
        left: 15px;

        width: 40px;
        height: 40px;

        background: #173d75;
        color: #fff;

        border-radius: 50%;

        font-size: 25px;
    }

    .crm-demo-box input {
        height: 50px;
        font-size: 16px;
    }
}