/* course.css — Per-Course Dashboard Page Styles */

/* Back Link */
.back-link {
    display: inline-block;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    margin-bottom: 1.5rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--secondary-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: var(--secondary-color);
    color: white;
}

/* CC license link */
.cc-link {
    color: var(--secondary-color);
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: color 0.3s ease;
}

.cc-link:hover {
    color: white;
}

/* Course Action Buttons */
.course-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.course-btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    min-width: 110px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.course-btn.read {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.course-btn.read:hover {
    background: transparent;
    color: var(--primary-color);
}

.course-btn.watch {
    background: #c0392b;
    color: white;
    border-color: #c0392b;
}

.course-btn.watch:hover {
    background: transparent;
    color: #c0392b;
}

.course-btn.teacher {
    background: #6a1b9a;
    color: white;
    border-color: #6a1b9a;
}

.course-btn.teacher:hover {
    background: transparent;
    color: #6a1b9a;
}

.course-btn.workbook {
    background: #e67e22;
    color: white;
    border-color: #e67e22;
}

.course-btn.workbook:hover {
    background: transparent;
    color: #e67e22;
}

.course-btn.cyoa {
    background: #2e7d32;
    color: white;
    border-color: #2e7d32;
}

.course-btn.cyoa:hover {
    background: transparent;
    color: #2e7d32;
}

/* Course Table Container */
.course-table-container {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
}

/* Quiz Table (shared with catalog page patterns) */
.quiz-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.quiz-table thead th {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.quiz-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.quiz-table tbody tr:last-child {
    border-bottom: none;
}

.quiz-table tbody tr:hover {
    background: rgba(218, 165, 32, 0.05);
}

.quiz-table td {
    padding: 0.6rem 0.75rem;
    vertical-align: middle;
}

.quiz-name {
    font-weight: 600;
    color: var(--text-primary);
}

.quiz-count {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.quiz-count.quiz-empty {
    color: var(--border-color);
}

/* Quiz action links */
.quiz-link {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
    white-space: nowrap;
}

.quiz-link:hover {
    background: transparent;
    color: var(--secondary-color);
}

.quiz-pending {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Study guide links */
.guide-link {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.guide-link:hover {
    background: var(--primary-color);
    color: white;
}

.guide-pending {
    color: var(--border-color);
    font-size: 0.85rem;
}

/* Flashcard links */
.fc-link {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fc-link:hover {
    background: var(--accent-color);
    color: white;
}

/* Slides links */
.slides-link {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: transparent;
    color: #c0392b;
    border: 1px solid #c0392b;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.slides-link:hover {
    background: #c0392b;
    color: white;
}

/* Mind map links */
.mindmap-link {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: transparent;
    color: #2e7d32;
    border: 1px solid #2e7d32;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mindmap-link:hover {
    background: #2e7d32;
    color: white;
}

/* Infographic links */
.infographic-link {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: transparent;
    color: #6a1b9a;
    border: 1px solid #6a1b9a;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.infographic-link:hover {
    background: #6a1b9a;
    color: white;
}

/* Sonnet popup button */
.sonnet-btn {
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
    background: #7B2D3F;
    color: #FFF;
    border: 1px solid #7B2D3F;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.sonnet-btn:hover {
    background: #5A1F2E;
}

/* Sonnet modal overlay */
.sonnet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.sonnet-overlay.active {
    display: flex;
}

.sonnet-modal {
    background: #FDF8F0;
    border: 2px solid #7B2D3F;
    border-radius: 12px;
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem 2.5rem;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sonnet-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #7B2D3F;
    cursor: pointer;
    line-height: 1;
}

.sonnet-close:hover {
    color: #5A1F2E;
}

.sonnet-title {
    font-family: 'Cinzel', serif;
    color: #7B2D3F;
    text-align: center;
    font-size: 1.3rem;
    margin: 0 0 1.2rem;
    border-bottom: 1px solid #E0D6C8;
    padding-bottom: 0.8rem;
}

.sonnet-text {
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    line-height: 1.7;
    white-space: pre-wrap;
    color: #1A1A2E;
    margin: 0;
    text-align: left;
}

/* Infographic popup button */
.infographic-btn {
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
    background: #6a1b9a;
    color: #FFF;
    border: 1px solid #6a1b9a;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.infographic-btn:hover {
    background: #4a148c;
}

/* Infographic modal overlay */
.infographic-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.infographic-overlay.active {
    display: flex;
}

.infographic-modal {
    background: #FDF8F0;
    border: 2px solid #6a1b9a;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.infographic-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #6a1b9a;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.infographic-close:hover {
    color: #4a148c;
}

.infographic-title {
    font-family: 'Cinzel', serif;
    color: #6a1b9a;
    text-align: center;
    font-size: 1.1rem;
    margin: 0 0 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E0D6C8;
}

.infographic-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 6px;
}

.infographic-loader {
    color: #8b949e;
    font-style: italic;
    padding: 2rem;
}

.infographic-fulllink {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #6a1b9a;
}

/* Video popup button */
.video-btn {
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
    background: #c0392b;
    color: #FFF;
    border: 1px solid #c0392b;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.video-btn:hover {
    background: #962d22;
}

/* Video modal overlay */
.video-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.video-overlay.active {
    display: flex;
}

.video-modal {
    background: #1a1a1a;
    border: 2px solid #c0392b;
    border-radius: 12px;
    max-width: 900px;
    width: 92%;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.video-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.video-close:hover {
    color: #fff;
}

.video-title {
    font-family: 'Cinzel', serif;
    color: #f0e6d3;
    text-align: center;
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
}

.video-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 6px;
}

/* Coming soon message */
.quiz-coming-soon {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .course-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .course-btn {
        width: 100%;
    }

    .quiz-table {
        font-size: 0.85rem;
    }

    .quiz-table thead {
        display: none;
    }

    .quiz-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.75rem 0;
    }

    .quiz-table td {
        padding: 0.25rem 0.5rem;
    }

    .quiz-name {
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    .quiz-link,
    .guide-link,
    .fc-link,
    .slides-link,
    .mindmap-link,
    .infographic-link,
    .video-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.8rem;
    }
}
