/* ═════════════════════════════════════════════════════════════
   CM COLLECTION - Quote Modal CSS
   ═════════════════════════════════════════════════════════════ */

.cm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647; /* Maximum possible z-index to stay above TheGem headers */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cm-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.cm-modal-glass {
    background: rgba(21, 25, 35, 0.85); /* --cm-bg-surface cu alpha */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    max-width: 540px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cm-modal-overlay.is-active .cm-modal-glass {
    transform: translateY(0) scale(1);
}

.cm-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.cm-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

.cm-modal-header {
    padding: 30px 30px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cm-modal-icon {
    font-size: 32px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(0, 168, 232, 0.5));
}

.cm-modal-header h2 {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.cm-modal-product-badge {
    display: inline-block;
    background: rgba(0, 168, 232, 0.15);
    color: #00a8e8; /* --cm-primary */
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(0, 168, 232, 0.3);
}

.cm-modal-body {
    padding: 25px 30px;
}

.cm-modal-footer {
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 13px;
}

.cm-modal-footer svg {
    color: #00a8e8;
}

/* Quform overrides specific for modal */
.cm-modal-body .quform-wrapper {
    margin: 0 !important;
}

.cm-modal-body .quform-input input,
.cm-modal-body .quform-input textarea {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 8px !important;
}

.cm-modal-body .quform-input input:focus,
.cm-modal-body .quform-input textarea:focus {
    border-color: #00a8e8 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    box-shadow: 0 0 0 2px rgba(0, 168, 232, 0.2) !important;
}

.cm-modal-body .quform-label {
    color: #e5e7eb !important;
    font-weight: 500 !important;
}

/* Scrollbar styling for modal */
.cm-modal-glass::-webkit-scrollbar {
    width: 6px;
}
.cm-modal-glass::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
.cm-modal-glass::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 600px) {
    .cm-modal-glass {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .cm-modal-header {
        padding: 20px 20px 15px;
    }
    
    .cm-modal-body {
        padding: 20px;
    }
}
