/* =========================================
   Centralized Demo/Consultation Request Modal
   Uses the site's global CSS variables (assets/css/global.css)
   so it always matches the brand colors automatically.
   ========================================= */

.demo-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 3, 32, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.demo-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.demo-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-white);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(3, 3, 32, 0.35);
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.demo-modal-overlay.show .demo-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.demo-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 1;
}

.demo-modal-close:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: rotate(90deg);
}

.demo-modal-header {
    background: var(--gradient-primary);
    color: var(--color-white);
    padding: 32px 28px 26px;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.demo-modal-header-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: var(--color-white);
}

.demo-modal-header h3 {
    font-size: var(--fs-24);
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.demo-modal-header p {
    font-size: var(--fs-14);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.demo-modal-body {
    padding: 28px;
}

.demo-modal-body .form-group {
    margin-bottom: 14px;
}

.demo-modal-body .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #E0E5EE;
    border-radius: 8px;
    font-size: var(--fs-14);
    font-family: var(--font-family-primary);
    color: var(--color-black);
    background: var(--color-light-blue);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.demo-modal-body .form-group input::placeholder {
    color: #9AA5B5;
}

.demo-modal-body .form-group input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px var(--color-blue-quarter);
    background: var(--color-white);
}

.demo-modal-body .btn-submit {
    width: 100%;
    margin-top: 6px;
    padding: 14px 24px;
    background: var(--color-green);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: var(--fs-16);
    font-weight: 600;
    font-family: var(--font-family-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.demo-modal-body .btn-submit:hover {
    background: #00a34f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-green-half);
}

.demo-modal-body .btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.demo-modal-body .form-status-msg {
    margin: 12px 0 0;
    font-size: var(--fs-14);
    line-height: 1.5;
    text-align: center;
}

.demo-modal-body .form-status-msg:empty {
    margin: 0;
}

.demo-modal-body .form-status-msg.form-status-success {
    color: var(--color-green);
}

.demo-modal-body .form-status-msg.form-status-error {
    color: var(--color-red);
}

/* Lock page scroll while modal is open */
body.demo-modal-open {
    overflow: hidden;
}

@media (max-width: 576px) {
    .demo-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .demo-modal {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }

    .demo-modal-overlay.show .demo-modal {
        transform: translateY(0);
    }

    .demo-modal-header {
        padding: 26px 20px 22px;
    }

    .demo-modal-body {
        padding: 22px 20px 28px;
    }
}
