/* ==========================================================
   COURSE APPLICATION MODAL — SUCCESS STATE, SCROLL LOCK,
   SPINNER, RESPONSIVE & SCROLLBAR
   ========================================================== */

/* Success State */
.course-modal-success {
    display: none;
    text-align: center;
    padding: 4px 0 0;
}

.course-modal-success.active {
    display: block;
}

/* Success Icon — layered circles with checkmark */
.course-modal-success .success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    width: 86px;
    height: 86px;
}

.course-modal-success .success-icon svg {
    display: block;
}

/* Heading */
.course-modal-success h3 {
    font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 20px;
    color: #2E2E2E;
    margin: 0 0 12px;
    text-transform: uppercase;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.course-modal-success h3 .line-break {
    display: block;
}

/* Body text */
.course-modal-success p {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #6F6F6F;
    line-height: 1.6;
    margin: 0 0 34px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* Done button */
.course-modal-success .course-btn-close-success {
    display: block;
    width: 100%;
    padding: 0;
    height: 40px;
    background: #0B678A;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
    letter-spacing: 0.3px;
}

.course-modal-success .course-btn-close-success:hover {
    background: #095573;
}

.course-modal-success .course-btn-close-success:focus-visible {
    outline: 2px solid #0B678A;
    outline-offset: 2px;
}

.course-modal-success .course-btn-close-success:active {
    transform: scale(0.98);
}

/* Body scroll lock when modal is open */
body.course-modal-open {
    overflow: hidden;
}

/* Loading spinner on button */
.course-btn-submit .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

.course-btn-submit.loading .spinner {
    display: block;
}

.course-btn-submit.loading .btn-text {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .course-modal {
        padding: 24px 20px;
        max-width: 100%;
        border-radius: 12px;
    }

    .course-modal-header h2 {
        font-size: 24px;
    }

    .course-modal-header p {
        font-size: 14px;
    }

    .course-form-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .course-modal-header {
        margin-bottom: 24px;
    }

    .course-modal-success h3 {
        font-size: 18px;
    }

    .course-modal-success p {
        font-size: 12px;
    }
}

/* Scrollbar styling */
.course-modal::-webkit-scrollbar {
    width: 6px;
}

.course-modal::-webkit-scrollbar-track {
    background: transparent;
}

.course-modal::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.course-modal::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}
