/* ==============================================
   MODAL/POPUP STYLES
   ============================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease-in-out;
    border-top: 4px solid var(--primary);
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-description {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    letter-spacing: 0.3px;
}

.modal-pricing {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent);
}

.pricing-details {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.pricing-details strong {
    font-weight: 700;
}

.module-price-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 1rem;
}

.original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.discount-price {
    color: var(--success);
    font-weight: 700;
    font-size: 1.1rem;
}

.discount-badge {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.modal-separator {
    border-top: 1px solid var(--bg-lighter);
    margin: 1.5rem 0;
}

.modal-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.modal-btn-proceed {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.modal-btn-proceed:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modal-btn-cancel {
    background-color: var(--bg-lighter);
    color: var(--text-dark);
    border: 2px solid var(--bg-lighter);
}

.modal-btn-cancel:hover {
    background-color: transparent;
    border-color: var(--text-muted);
}

/* Individual Module Enroll Buttons */
.btn-enroll-module {
    background-color: #2563eb !important;
    color: white !important;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn-enroll-module:hover {
    background-color: #1e40af !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-enroll-module:active {
    background-color: #1e40af !important;
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

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

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

/* Mobile Responsive */
@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-btn {
        width: 100%;
    }
}
