/* my-courses.css — MyCourses page (adapted from Success-Center-LMS/css/my-courses.css)
   Simplified: no instructor/meta/badge (those fields aren't in the current data model). */

.mc-page {
    --mc-blue-btn: #00416a;
    --mc-page-bg: #f9f9f9;
    --mc-card-radius: 10px;
    --mc-tab-radius: 24px;
    --mc-text: #2d2d2d;
    --mc-muted: #757575;
    --mc-completed-badge-bg: #fef9c3;
    --mc-completed-badge-text: #854d0e;
    --mc-category-bar: #ffffff;
    --mc-border: #eeeeee;

    font-family: 'Cairo', sans-serif;
    background-color: var(--mc-page-bg);
    min-height: 60vh;
    padding-bottom: 48px;
}

.mc-wrap {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 40px 50px 0;
}

@media (max-width: 991px) {
    .mc-wrap {
        padding: 28px 20px 0;
    }
}

.mc-page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--mc-text);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.mc-page-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--mc-muted);
    margin: 0 0 28px;
    line-height: 1.65;
    max-width: 520px;
}

/* Tabs */
.mc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.mc-tab {
    padding: 10px 26px;
    border-radius: var(--mc-tab-radius);
    border: 1px solid var(--mc-blue-btn);
    background: #fff;
    color: var(--mc-blue-btn);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s ease;
    font-family: inherit;
    line-height: 1.5;
    outline: none;
}

.mc-tab:focus,
.mc-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 65, 106, 0.15);
}

.mc-tab:hover {
    background: #f0f7fc;
    transform: translateY(-1px);
}

.mc-tab:active {
    transform: scale(0.97);
}

.mc-tab.is-active {
    background: var(--mc-blue-btn);
    color: #fff;
    border-color: var(--mc-blue-btn);
    box-shadow: 0 2px 8px rgba(0, 65, 106, 0.25);
    font-weight: 700;
}

.mc-panel {
    display: none;
    animation: mcFade 0.45s ease;
}

.mc-panel.is-active {
    display: block;
}

@keyframes mcFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Grid */
.mc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

@media (max-width: 1199px) {
    .mc-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    .mc-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 575px) {
    .mc-grid { grid-template-columns: 1fr; }
}

/* Card */
.mc-card {
    background: #fff;
    border-radius: var(--mc-card-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--mc-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.mc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}

.mc-card.mc-card-disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.mc-card.mc-card-disabled:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Under Review tab: not a link; show admin message */
.mc-card.mc-card--review {
    cursor: default;
    pointer-events: auto;
}

.mc-card.mc-card--review:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.mc-card-review-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #854d0e;
    background: #fffbeb;
    border: 1px solid rgba(234, 179, 8, 0.35);
}

.mc-card-review-msg i {
    margin-top: 2px;
    flex-shrink: 0;
    color: #a16207;
}

.mc-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--mc-card-radius) var(--mc-card-radius) 0 0;
    background: #f5f7fa;
}

.mc-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mc-card-kind-badge {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    pointer-events: none;
}

.mc-card-kind-badge .badge {
    font-size: 11px;
    font-weight: 700;
    padding: 0.35em 0.65em;
}

.mc-badge--completed {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: var(--mc-completed-badge-bg);
    color: var(--mc-completed-badge-text);
    border: 1px solid rgba(133, 77, 14, 0.12);
    z-index: 2;
}

.mc-category-strip {
    background: var(--mc-category-bar);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #000;
    border-bottom: 1px solid var(--mc-border);
}

.mc-card-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mc-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--mc-text);
    line-height: 1.45;
    margin: 0 0 10px;
    min-height: calc(1.45em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mc-card-desc {
    font-size: 13px;
    font-weight: 500;
    color: var(--mc-muted);
    line-height: 1.55;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.mc-card-hours {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    margin: 0 0 10px;
}

.mc-card-hours i {
    color: #f39200;
    font-size: 12px;
}

.mc-card-type {
    font-size: 12px;
    font-weight: 700;
    color: var(--mc-blue-btn);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--mc-border);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Card footer: right = lectures, center = rating, left = icon (RTL) */
.mc-card-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
    padding-inline: 14px;
    min-height: 34px;
    border-top: 1px solid var(--mc-border);
    margin-top: auto;
}

.mc-meta-start {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mc-meta-center {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mc-meta-end {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.mc-rating {
    font-size: 14px;
    font-weight: 400;
    color: #6a6f78;
}

.mc-rating i {
    color: #6a6f78;
    font-size: 12px;
}

.mc-lectures {
    font-size: 14px;
    font-weight: 400;
    color: var(--mc-muted);
}

.mc-lectures i {
    font-size: 12px;
    color: #8f8f8f;
}

/* Certificate button (completed) */
.mc-btn-cert {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 11px 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--mc-blue-btn);
    background: #fff;
    border: 1.5px solid var(--mc-blue-btn);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.22s, color 0.22s, transform 0.16s ease, box-shadow 0.22s;
    font-family: inherit;
    cursor: pointer;
}

.mc-btn-cert:hover {
    background: var(--mc-blue-btn);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 65, 106, 0.22);
    text-decoration: none;
}

.mc-btn-cert:active {
    transform: scale(0.98);
}

/* Empty state */
.mc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px 72px;
    min-height: 420px;
}

.mc-empty-illu {
    width: min(100%, 320px);
    margin-bottom: 28px;
}

.mc-empty-illu img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.mc-empty-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--mc-text);
    margin: 0 0 12px;
}

.mc-empty-desc {
    font-size: 14px;
    font-weight: 600;
    color: var(--mc-muted);
    max-width: 420px;
    margin: 0 0 28px;
    line-height: 1.75;
}

.mc-btn-browse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 420px;
    max-width: 100%;
    height: 54px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    background: var(--mc-blue-btn);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 65, 106, 0.28);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mc-btn-browse:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 65, 106, 0.35);
    text-decoration: none;
}

/* Inline loader — same as main #page-preloader / courses grid (home.css .preloader-*) */
.mc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    min-height: 220px;
    grid-column: 1 / -1;
}

.mc-loading .preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Section-sized logo + spinner (matches .courses-loader in courses.css) */
.mc-loading .preloader-logo {
    height: 55px;
    width: auto;
    animation: zoomPulse 1.5s infinite ease-in-out alternate;
}

.mc-loading .preloader-spinner {
    width: 42px;
    height: 42px;
    border-width: 4px;
}
