.moringa-mycourses-container {
    color: #0b1a30;
}

.moringa-mycourses-section {
    margin-bottom: 32px;
}

.moringa-mycourses-section .moringa-panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #101F3C;
}

.moringa-mycourses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.moringa-course-card {
    border: 1px solid #FA510F26;
    border-radius: 16px;
    background: #FFFFFF80;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: rgba(100, 100, 111, 0.15) 0px 7px 20px 0px;
}

.moringa-course-card .course-img-box {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
}

.moringa-course-card .course-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moringa-course-card-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--moringa-orange, #ff5e14);
    margin: 0 0 6px 0;
}

.moringa-bar-container {
    width: 100%;
    background-color: #edf2f7;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-top: 10px;
}

.moringa-bar-fill {
    background-color: #1492cc;
    height: 100%;
    border-radius: 10px;
}

.moringa-course-card-progress-label {
    font-size: 12px;
    color: #101F3CA6;
    margin-top: 4px;
}

.moringa-hero-badge {
    background-color: #eef7fc;
    color: #2b6cb0;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid;
}

.moringa-course-card .moringa-btn-outline {
    align-self: flex-start;
    border: 2px solid var(--moringa-orange, #ff5e14);
    color: var(--moringa-orange, #ff5e14) !important;
    background: transparent;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    text-decoration: none !important;
    transition: 0.2s ease;
}

.moringa-course-card .moringa-btn-outline:hover {
    background: var(--moringa-orange, #ff5e14);
    color: #ffffff !important;
}

.moringa-mycourses-container .moringa-empty-state {
    padding: 16px 14px;
    color: #6c757d;
    font-size: 13px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fafafa;
    border-radius: 4px;
    border: 1px dashed #e0e0e0;
}

.moringa-mycourses-container .not-enrolled-card {
    text-align: center;
    padding: 30px 20px;
    background: #fdfdfd;
    border: 1px dashed #dcdcdc;
    border-radius: 8px;
}

.moringa-mycourses-container .not-enrolled-icon {
    font-size: 32px;
    color: #a0a0a0;
    margin-bottom: 12px;
}

.moringa-mycourses-container .not-enrolled-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 6px;
}

.moringa-mycourses-container .not-enrolled-sub {
    font-size: 13px;
    color: #666666;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.4;
}

body[data-bs-theme="dark"] .moringa-mycourses-container {
    color: #fff;
}

body[data-bs-theme="dark"] .moringa-course-card {
    background: #0d111a;
    border-color: #23252b;
}

body[data-bs-theme="dark"] .moringa-mycourses-section .moringa-panel-title {
    color: #fff;
}

/* My Courses page: header + filters + horizontal row cards. */

.mycourses-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.mycourses-title {
    font-size: 24px;
    font-weight: 700;
    color: #101F3C;
    margin: 0;
}

.mycourses-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mycourses-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #101F3C;
}

.mycourses-filter select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23101F3C'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid #0A96C14D;
    border-radius: 20px;
    padding: 6px 30px 6px 14px;
    font-weight: 600;
    font-size: 14px;
    color: #101F3C;
}

.mycourses-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .mycourses-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .mycourses-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .mycourses-list {
        grid-template-columns: 1fr;
    }
}

.mycourses-card {
    display: flex;
    align-items: stretch;
    gap: 14px;
    border: 1px solid #0A96C14D;
    border-radius: 14px;
    background: #fff;
    padding: 10px;
}

.mycourses-card-thumb {
    flex: 0 0 40%;
    aspect-ratio: 1 / 1;
    /* Square, sized purely from width - don't stretch to the text column's height. */
    align-self: center;
    border-radius: 10px;
    overflow: hidden;
}

.mycourses-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mycourses-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.mycourses-card-body h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--moringa-orange, #ff5e14);
    margin: 0;
    line-height: 1.25;
}

.mycourses-card-badge {
    background-color: #eef7fc;
    color: #2b6cb0;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid #2b6cb04d;
}

.mycourses-card-duration {
    font-size: 12px;
    color: #101F3C;
}

.mycourses-card-btn {
    margin-top: 2px;
    background: #0e1c33;
    color: #fff !important;
    padding: 7px 14px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none !important;
    display: inline-block;
}

.mycourses-card-btn:hover {
    background: var(--moringa-orange, #ff5e14);
}

@media (max-width: 560px) {
    .mycourses-card-btn {
        font-size: 10px;
    }
}

body[data-bs-theme="dark"] .mycourses-title,
body[data-bs-theme="dark"] .mycourses-filter {
    color: #fff;
}

body[data-bs-theme="dark"] .mycourses-card {
    background: #0d111a;
    border-color: #23252b;
}

body[data-bs-theme="dark"] .mycourses-card-duration {
    color: #fff;
}
/* "Continue Learning" held while the portal payment check syncs in the background. */
.mycourses-btn-syncing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    pointer-events: none;
    cursor: progress;
}
.mycourses-btn-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: mycourses-btn-spin 0.75s linear infinite;
    flex-shrink: 0;
}
@keyframes mycourses-btn-spin {
    to { transform: rotate(360deg); }
}
