/* =========================================
   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: 40px;
    height: 40px;
    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-16);
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

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

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

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

.demo-modal-body .form-group input,
.demo-modal-body .form-group select,
.demo-modal-body .form-group textarea {
    width: 100%;
    padding: 8px 12px;
    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 textarea {
    resize: vertical;
}

.demo-modal-body .form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230E3BA6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.demo-modal-body .form-group select:invalid {
    color: #9AA5B5;
}

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

.demo-modal-body .form-group input:focus,
.demo-modal-body .form-group select:focus,
.demo-modal-body .form-group textarea:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px var(--color-blue-quarter);
    background-color: 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;
}

/* Custom Multi-Select Dropdown */
.custom-multiselect {
    position: relative;
    width: 100%;
}

.multiselect-trigger {
    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;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.multiselect-trigger:focus,
.custom-multiselect.open .multiselect-trigger {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px var(--color-blue-quarter);
    background-color: var(--color-white);
}

.multiselect-placeholder {
    color: #9AA5B5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multiselect-placeholder.has-value {
    color: var(--color-black);
    font-weight: 500;
}

.multiselect-arrow {
    color: var(--color-blue);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.custom-multiselect.open .multiselect-arrow {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-white);
    border: 1.5px solid #E0E5EE;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(3, 3, 32, 0.15);
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    padding: 6px 0;
}

.custom-multiselect.open .multiselect-dropdown {
    display: block;
}

.multiselect-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-black);
    transition: background 0.2s ease;
    user-select: none;
    margin: 0;
}

.multiselect-option:hover {
    background: #f0f6ff;
}

.multiselect-option input[type="checkbox"] {
    accent-color: var(--color-blue);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.multiselect-option .option-text {
    font-size: 13px;
    color: #333;
}

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

    .demo-modal {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 20px;
        transform: translateY(24px) scale(0.96);
    }

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

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

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