/**
 * Course Catalog Styles
 *
 * Styles for course roadmap visualization, course lists,
 * next course recommendations, and dog course tracking
 */

/* ==========================================================================
   Course Roadmap
   ========================================================================== */

.course-roadmap {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .course-roadmap {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
}

.roadmap-header {
    text-align: center;
    margin-bottom: 30px;
}

.roadmap-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: var(--text-primary, #1e293b);
}

.roadmap-header p {
    color: var(--text-secondary, #64748b);
    margin: 0;
}

.roadmap-visual {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* Start Node */
.roadmap-start .node-circle.start {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Tracks */
.roadmap-track {
    background: var(--card-bg, white);
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 600px;
}

@media (prefers-color-scheme: dark) {
    .roadmap-track {
        background: #1e293b;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
}

.track-label {
    font-weight: 600;
    color: var(--text-secondary, #475569);
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.track-courses {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

/* Course Nodes */
.course-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.course-node .node-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--node-color, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.course-node .node-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.course-node .node-label {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary, #64748b);
    text-align: center;
    max-width: 80px;
    line-height: 1.3;
}

.course-node .node-connector {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 2px;
    background: #cbd5e1;
}

/* Branch Indicator */
.roadmap-branch {
    width: 100%;
    text-align: center;
    position: relative;
    padding: 20px 0;
}

.branch-indicator {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Specializations Grid */
.roadmap-specializations {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 800px;
}

@media (max-width: 768px) {
    .roadmap-specializations {
        grid-template-columns: 1fr;
    }
}

/* Special Courses */
.roadmap-specials {
    background: var(--card-bg, white);
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 600px;
}

@media (prefers-color-scheme: dark) {
    .roadmap-specials {
        background: #1e293b;
    }
}

.special-courses {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.special-node {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--node-color, #06b6d4);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
}

.special-node .node-code {
    font-weight: 700;
}

.special-node .node-name {
    font-weight: 400;
    opacity: 0.9;
}

/* Legend */
.roadmap-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ==========================================================================
   Course List
   ========================================================================== */

.course-list {
    display: grid;
    gap: 15px;
}

.course-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg, white);
    border-radius: 8px;
    border-left: 4px solid var(--course-color, #3b82f6);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-list-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
    .course-list-item {
        background: #1e293b;
    }
}

.course-list-item .course-code {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--course-color, #3b82f6);
    min-width: 60px;
}

.course-list-item .course-info {
    flex: 1;
}

.course-list-item .course-name {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin-bottom: 4px;
}

.course-list-item .course-prereqs {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
}

.course-list-item .course-arrow {
    color: #cbd5e1;
    font-size: 1.2rem;
}

/* ==========================================================================
   Next Courses Recommendations
   ========================================================================== */

.next-courses-section {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

@media (prefers-color-scheme: dark) {
    .next-courses-section {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    }
}

.next-courses-section h3 {
    margin: 0 0 20px 0;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (prefers-color-scheme: dark) {
    .next-courses-section h3 {
        color: #6ee7b7;
    }
}

.next-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.next-course-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.next-course-card:hover {
    transform: translateY(-5px);
}

@media (prefers-color-scheme: dark) {
    .next-course-card {
        background: #1e293b;
    }
}

.next-course-card .course-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--course-color, #3b82f6);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.next-course-card .course-name {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin-bottom: 8px;
}

.next-course-card .course-description {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    line-height: 1.4;
}

.next-course-card .course-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: var(--course-color, #3b82f6);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.next-course-card .course-link:hover {
    opacity: 0.9;
}

/* Empty state */
.no-next-courses {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary, #64748b);
}

.no-next-courses p {
    margin: 0;
}

/* ==========================================================================
   Dog Courses Section
   ========================================================================== */

.dog-courses-section {
    background: var(--card-bg, white);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (prefers-color-scheme: dark) {
    .dog-courses-section {
        background: #1e293b;
    }
}

.dog-courses-section h4 {
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Completed Courses */
.completed-courses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.completed-course-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
}

.completed-course-badge .checkmark {
    font-size: 0.85rem;
}

.completed-course-badge .course-code {
    font-weight: 700;
}

.completed-course-badge .completed-date {
    font-size: 0.75rem;
    opacity: 0.8;
}

.completed-course-badge .remove-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.completed-course-badge .remove-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Add Course Form */
.add-course-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    padding-top: 15px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.add-course-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.add-course-form label {
    font-size: 0.8rem;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
}

.add-course-form select,
.add-course-form input[type="date"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--input-bg, white);
    color: var(--text-primary, #1e293b);
}

@media (prefers-color-scheme: dark) {
    .add-course-form select,
    .add-course-form input[type="date"] {
        background: #0f172a;
        border-color: #334155;
    }
}

.add-course-form .btn-add {
    padding: 8px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.add-course-form .btn-add:hover {
    background: #2563eb;
}

/* ==========================================================================
   Category Filter Tabs
   ========================================================================== */

.course-category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.category-tab {
    padding: 8px 16px;
    background: var(--card-bg, #f1f5f9);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary, #64748b);
    transition: all 0.2s ease;
}

.category-tab:hover {
    background: #e2e8f0;
}

.category-tab.active {
    background: #3b82f6;
    color: white;
}

@media (prefers-color-scheme: dark) {
    .category-tab {
        background: #334155;
        color: #94a3b8;
    }

    .category-tab:hover {
        background: #475569;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .course-roadmap {
        padding: 20px 15px;
    }

    .roadmap-start .node-circle.start {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }

    .course-node .node-circle {
        width: 50px;
        height: 50px;
        font-size: 11px;
    }

    .course-node .node-label {
        font-size: 0.7rem;
        max-width: 60px;
    }

    .branch-indicator {
        font-size: 0.8rem;
        padding: 8px 18px;
    }

    .legend-item {
        font-size: 0.75rem;
    }

    .next-courses-grid {
        grid-template-columns: 1fr;
    }

    .add-course-form {
        flex-direction: column;
    }

    .add-course-form .form-group {
        width: 100%;
    }

    .add-course-form select,
    .add-course-form input[type="date"] {
        width: 100%;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .course-roadmap {
        background: white !important;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .course-node .node-circle {
        box-shadow: none;
        border: 2px solid currentColor;
    }

    .add-course-form {
        display: none;
    }
}
