/* Scroll override for my-courses page */
html:has(body.my-courses-page) {
    touch-action: auto;
    overflow-x: hidden;
}

body.my-courses-page {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
    touch-action: auto;
    overscroll-behavior: auto;
    background: #fefefa;
    margin: 0;
}

body.my-courses-page .container {
    overflow: visible;
}

/* Reuse courses-header, courses-nav, courses-layout, courses-side-col from courses.css inline */
/* Header styles (same as courses page) */
body.my-courses-page .courses-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fefefa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    height: 64px;
    display: flex;
    align-items: center;
}

body.my-courses-page .courses-header-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.my-courses-page .courses-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

body.my-courses-page .courses-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

body.my-courses-page .courses-header-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

body.my-courses-page .courses-nav-link {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 300;
    transition: color 0.2s;
}

body.my-courses-page .courses-nav-link:hover {
    color: #3C4BFB;
}

/* Three-column layout */
body.my-courses-page .courses-layout {
    display: flex;
    min-height: calc(100vh - 48px);
    width: 100%;
    position: relative;
}

body.my-courses-page .courses-side-col {
    display: none;
    flex: 1;
    flex-direction: column;
}

body.my-courses-page .courses-side-row {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.my-courses-page .courses-side-fill {
    flex: 1;
    width: 100%;
}

/* Center column */
.my-courses-center-col {
    position: relative;
    width: 100%;
    max-width: 700px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    min-width: 0;
}

/* Hero / title */
.my-courses-hero {
    padding: 48px 24px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.my-courses-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 300;
    color: #1a1a2e;
    margin: 0;
}

/* Loading */
.my-courses-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 24px;
    gap: 16px;
    color: #888;
    font-size: 15px;
}

.my-courses-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #eee;
    border-top-color: #3C4BFB;
    border-radius: 50%;
    animation: my-courses-spin 0.8s linear infinite;
}

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

/* Empty state */
.my-courses-empty {
    padding: 64px 24px;
    text-align: center;
    color: #888;
    font-size: 16px;
}

.my-courses-cta-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 32px;
    border-radius: 50px;
    background: linear-gradient(135deg, #232d9b 0%, #667eea 100%);
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.my-courses-cta-btn:hover {
    opacity: 0.9;
}

/* Error state */
.my-courses-error {
    padding: 48px 24px;
    text-align: center;
    color: #c33;
    font-size: 15px;
}

/* FAB: Create new course */
.my-courses-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s, border-color 0.2s;
    z-index: 20;
}

.my-courses-fab:hover {
    border-color: #ccc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Course sections */
.my-courses-sections {
    padding: 0 24px 0;
}

/* Book section */
.my-courses-book-section {
    padding: 32px 0 0;
}

.my-courses-book-section:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 32px;
}

.my-courses-book-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.my-courses-book-cover {
    width: 56px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 16px #D4B9FB80, 0 0 40px #D4B9FB40;
    flex-shrink: 0;
}

.my-courses-book-meta {
    min-width: 0;
}

.my-courses-book-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 2px;
    line-height: 1.3;
}

.my-courses-book-author {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* Course card */
.my-courses-course-card {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #1a1a2e;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    margin-bottom: 4px;
}

.my-courses-course-card:hover {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.my-courses-course-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.my-courses-course-arrow {
    font-size: 18px;
    flex-shrink: 0;
    color: #888;
}

.my-courses-course-context {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.my-courses-course-meta {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    padding-left: 30px;
    font-size: 12px;
    color: #999;
}

.my-courses-course-status {
    text-transform: capitalize;
}

.my-courses-course-steps {
    color: #888;
}

/* Desktop */
@media (min-width: 768px) {
    body.my-courses-page .courses-side-col {
        display: flex;
    }

    body.my-courses-page .courses-side-col:first-child {
        border-right: 1px solid rgba(0, 0, 0, 0.1);
    }

    body.my-courses-page .courses-side-col:last-child {
        border-left: 1px solid rgba(0, 0, 0, 0.1);
    }

    .my-courses-center-col {
        width: 700px;
    }

    .my-courses-hero {
        padding: 48px 32px 24px;
    }

    .my-courses-sections {
        padding: 0 32px 0;
    }

}

/* Mobile */
@media (max-width: 767px) {
    body.my-courses-page .courses-header-links {
        gap: 16px;
    }

    .my-courses-center-col {
        max-width: 100%;
    }

    .my-courses-title {
        font-size: 24px;
    }
}
