/* Stark Knowledge - Custom Styles */

/* General */
body {
    background-color: #f8f9fa;
}

/* Cards */
.subject-card,
.topic-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.subject-card:hover,
.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Work Items */
.work-item.completed {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.work-item.completed .card-title {
    text-decoration: line-through;
}

.completion-checkbox {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}

/* Notes Section */
.notes-editor {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.notes-editor.show {
    max-height: 500px;
}

.notes-editor:not(.d-none) {
    max-height: none;
}

.notes-textarea {
    resize: vertical;
    min-height: 80px;
}

.notes-status {
    display: block;
    margin-top: 0.25rem;
}

.notes-status.saving {
    color: #6c757d;
}

.notes-status.saved {
    color: #198754;
}

.notes-status.error {
    color: #dc3545;
}

/* Schedule Picker */
.schedule-picker {
    max-width: 200px;
}

.schedule-date {
    cursor: pointer;
}

/* Calendar */
.calendar-container {
    overflow-x: auto;
}

.calendar-table {
    min-width: 700px;
    table-layout: fixed;
}

.calendar-table th {
    text-align: center;
    font-weight: 600;
}

.calendar-day {
    height: 120px;
    vertical-align: top;
    padding: 0.5rem;
}

.calendar-day.today {
    background-color: #e7f5ff;
}

.day-number {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.calendar-day.today .day-number {
    color: #0d6efd;
}

.day-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-item {
    display: block;
    padding: 2px 4px;
    background-color: #e9ecef;
    border-radius: 3px;
    font-size: 0.75rem;
    text-decoration: none;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-item:hover {
    background-color: #dee2e6;
}

.calendar-item.completed {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* Progress Bar */
.progress-bar {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-day {
        height: 100px;
        padding: 0.25rem;
    }

    .calendar-item {
        font-size: 0.65rem;
    }

    .d-flex.gap-2 {
        flex-wrap: wrap;
    }

    .work-item .d-flex {
        flex-direction: column;
    }

    .work-item .ms-2 {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .calendar-table th {
        font-size: 0.75rem;
    }

    .day-number {
        font-size: 0.85rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .btn-group {
        flex-wrap: wrap;
    }
}

/* Navbar active state */
.nav-link.active {
    font-weight: 600;
}

/* Form improvements */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Button group styling */
.btn-group .btn.active {
    font-weight: 600;
}

/* Markdown content in descriptions */
.markdown-content p:last-child {
    margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 0.25rem;
    padding-left: 1.5rem;
}

.markdown-content code {
    background-color: #e9ecef;
    padding: 0.125rem 0.25rem;
    border-radius: 0.2rem;
    font-size: 0.875em;
}

.markdown-content pre {
    background-color: #e9ecef;
    padding: 0.5rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin-bottom: 0.25rem;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
}

.markdown-content a {
    color: #0d6efd;
    text-decoration: underline;
}

.markdown-content a:hover {
    color: #0a58ca;
}

/* Alert styling */
.alert {
    border-radius: 0.5rem;
}
