/* ==========================================
   MODERN MINIMALIST DESIGN - NETSUITE CPQ
   ========================================== */

/* Global Color Palette */
:root {
    --primary-color: #1a1a2e;
    --secondary-color: linear-gradient(90deg, #2eb2fa, #8078d1, #3dafed);
    --accent-color: #10b981;
    --neutral-bg: #f9fafb;
    --neutral-border: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: "MarbleBold", sans-serif;
;
}

/* ==========================================
   MODAL OVERLAY
   ========================================== */
#ns-cpq-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ==========================================
   MODAL CONTAINER
   ========================================== */
.ns-cpq-modal {
    background: var(--white);
    width: 95%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   HEADER
   ========================================== */
.ns-cpq-modal h3 {
    margin: 0;
    padding: 16px 20px;
    border-bottom: 1px solid var(--neutral-border);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

#ns-cpq-close {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    width: 36px;
    height: 36px;
}

#ns-cpq-close:hover {
    color: var(--text-primary);
    background: var(--neutral-bg);
}

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */
.ns-cpq-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 18px;
    padding: 18px;
    overflow-y: auto;
    background: var(--neutral-bg);
}

/* ==========================================
   QUESTIONS SECTION
   ========================================== */
.ns-cpq-question-group {
    background: var(--white);
    border: 1px solid var(--neutral-border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.ns-cpq-question-group:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-sm);
}

.ns-cpq-question-group strong {
    color: linear-gradient(90deg, #2eb2fa, #8078d1, #3dafed);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    font-weight: 800;
}

.ns-cpq-question-group > div:first-of-type {
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
    color: var(--text-primary);
}

/* ==========================================
   ANSWERS/OPTIONS
   ========================================== */
.ns-cpq-answers {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ns-cpq-answers label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--neutral-bg);
    border: 1.5px solid var(--neutral-border);
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    font-size: 12px;
    color: var(--text-primary);
}

.ns-cpq-answers label:hover {
    border-color: linear-gradient(90deg, #2eb2fa, #8078d1, #3dafed);
    background: linear-gradient(90deg, #2eb2fa, #8078d1, #3dafed);
}

.ns-cpq-answers input[type="radio"] {
    accent-color: var(--secondary-color);
    transform: scale(1.2);
    cursor: pointer;
    flex-shrink: 0;
}

.ns-cpq-answers input[type="radio"]:checked + span,
.ns-cpq-answers input[type="radio"]:checked {
    color: var(--secondary-color);
}

/* ==========================================
   SUMMARY CARD (STICKY SIDEBAR)
   ========================================== */
.ns-cpq-summary-card {
    position: sticky;
    top: 18px;
    background: linear-gradient(135deg, #2eb2fa, #8078d1, #3dafed);;
    color: #ffffff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.ns-cpq-summary-card .flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 18px;
    letter-spacing: 0.2px;
    font-weight: 800;
}

.ns-cpq-summary-card .flex-row:last-of-type {
    margin-bottom: 0;
    font-size: 18px;
    font-weight: 800;

}

#ns-selected-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;
    opacity: 0.9;
    font-weight: 800;
    font-family: var(--font-family);
}

#ns-selected-options div {
    opacity: 0.85;
}

#ns-total-price {
    font-size: 20px;
    font-weight: 700;
    margin-top: 3px;
}

/* ==========================================
   FOOTER
   ========================================== */
.ns-cpq-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--neutral-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: var(--white);
}


/* ==========================================
   BUTTONS
   ========================================== */

/* Primary Action Button */
#ns-save-config-btn {
    background: linear-gradient(90deg, #2eb2fa, #8078d1, #3dafed);;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.2px;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

#ns-save-config-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}

#ns-save-config-btn:active {
    transform: translateY(0);
}

/* Configure Button */
#ns-configure-btn {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.2px;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

#ns-configure-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}

#ns-configure-btn:active {
    transform: translateY(0);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1200px) {
    .ns-cpq-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .ns-cpq-summary-card {
        position: relative;
        top: auto;
    }
}

@media (max-width: 768px) {
    .ns-cpq-modal {
        width: 98%;
        max-height: 95vh;
    }
    
    .ns-cpq-modal h3 {
        font-size: 20px;
        padding: 24px 20px;
    }
    
    .ns-cpq-layout {
        padding: 20px;
        gap: 16px;
    }
    
    .ns-cpq-question-group {
        padding: 18px;
        margin-bottom: 16px;
    }
    
    .ns-cpq-summary-card {
        padding: 20px;
    }
    
    .ns-cpq-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    #ns-configure-btn,
    #ns-save-config-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .ns-cpq-modal h3 {
        font-size: 18px;
        padding: 20px 16px;
    }
    
    .ns-cpq-layout {
        padding: 16px;
    }
    
    .ns-cpq-question-group {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .ns-cpq-question-group > div:first-of-type {
        font-size: 16px;
    }
    
    .ns-cpq-answers label {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    #ns-total-price {
        font-size: 24px;
    }
}
