/* ==========================================================================
   Timetable Panel — page-specific admin styles.

   Loaded after ../../teaching/admin/css/styles.css, which supplies the whole
   shared admin design system (cards, buttons, modal, toast, .dynamic-card…).
   Only what's unique to THIS panel belongs here: categories now carry their
   own entries nested inside them, which the shared stylesheet has no classes
   for since teaching/admin never nests one card inside another.
   ========================================================================== */

/* A category's entries live inside its own card, offset from the category's
   own fields so the nesting reads clearly without needing a separate tab. */
.category-block {
    margin-bottom: 14px;
}

.category-entries {
    border-top: 1px dashed #d8dbe6;
    padding: 12px 14px 14px;
    background: rgba(0, 0, 0, 0.015);
}

.category-entries-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.78em;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entry-list .dynamic-card {
    margin-bottom: 8px;
}

.entry-list .dynamic-card:last-child {
    margin-bottom: 0;
}

/* A hidden entry stays visible and editable here — so it can be found and
   restored — but reads as muted/off at a glance, distinguishing it from a
   normal published row without having to open it. */
.dynamic-card.is-hidden {
    opacity: 0.55;
}

.dynamic-card.is-hidden .dynamic-card-head {
    background: repeating-linear-gradient(45deg,
            #f0f2fc, #f0f2fc 8px,
            #e8eaf0 8px, #e8eaf0 16px);
}

html[data-theme="dark"] .category-entries {
    background: rgba(255, 255, 255, 0.02);
    border-top-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .dynamic-card.is-hidden .dynamic-card-head {
    background: repeating-linear-gradient(45deg,
            var(--dark-surface), var(--dark-surface) 8px,
            var(--dark-surface-light) 8px, var(--dark-surface-light) 16px);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .category-entries {
        background: rgba(255, 255, 255, 0.02);
        border-top-color: rgba(255, 255, 255, 0.1);
    }

    html:not([data-theme="light"]) .dynamic-card.is-hidden .dynamic-card-head {
        background: repeating-linear-gradient(45deg,
                var(--dark-surface), var(--dark-surface) 8px,
                var(--dark-surface-light) 8px, var(--dark-surface-light) 16px);
    }
}
