@import url("workspace-header.css");

:root {
    --sims-page-bg: #f5f5f5;
    --sims-workspace-bg: #edf3f5;
    --sims-component-bg: #ffffff;
    --sims-title-color: #24373f;
    --sims-component-title-color: #304851;
    --sims-text-color: #465a63;
    --sims-detail-color: #5d7079;
    --sims-support-title-color: #566c76;
    --sims-action-color: #365f72;
    --sims-action-hover-color: #294d5d;
    --sims-hover-bg: #f7fafb;
    --sims-control-bg: #f3f7f8;
    --sims-progress-track: #e5ecef;
    --sims-progress-fill: #2f6878;
    --sims-chart-grid: #e3eaed;
    --sims-chart-course: #2f6878;
    --sims-chart-units: #ad6b32;
    --sims-success-bg: #edf7f2;
    --sims-success-text: #286447;
    --sims-warning-bg: #fff4dc;
    --sims-warning-text: #805500;
    --sims-warning-dot: #d18a00;
    --sims-navigation-bg: #ffffff;
    --sims-navigation-text: var(--sims-title-color);
    --sims-navigation-muted: var(--sims-detail-color);
    --sims-navigation-active-bg: #edf3f5;
    --sims-navigation-hover-bg: #f5f5f5;
    --sims-navigation-shadow: 0 2px 10px rgba(36, 55, 63, .08);
    --sims-radius: .5rem;
    --sims-component-shadow: 0 1px 3px rgba(36, 55, 63, .08);
    --sims-workspace-padding: 1rem;

    /* Shared workspace typography hierarchy. */
    --sims-font-page-title: 1.35rem;
    --sims-font-page-detail: .82rem;
    --sims-font-section-title: 1rem;
    --sims-font-component-title: 1rem;
    --sims-font-component-detail: .75rem;
    --sims-font-field-label: .7rem;
    --sims-font-field-value: .8rem;
    --sims-font-action: .75rem;
}

body,
main[role="main"] {
    background: var(--sims-page-bg);
    color: var(--sims-text-color);
}

.sims-ui-component {
    background: var(--sims-component-bg);
    color: var(--sims-text-color);
    border: 0;
    border-radius: var(--sims-radius);
    box-shadow: var(--sims-component-shadow);
}

.sims-ui-title {
    color: var(--sims-title-color);
}

.sims-ui-component-title {
    color: var(--sims-component-title-color);
}

.sims-ui-detail {
    color: var(--sims-detail-color);
}

.sims-ui-support-title {
    color: var(--sims-support-title-color);
}

.sims-ui-action {
    color: var(--sims-action-color);
}

/* Shared first-paint motion for Student Workspace components. */
.dashboard-workspace > :not(script):not(style),
.student-my-info-wizard > :not(script):not(style),
.student-course-enlistment-workspace > :not(script):not(style),
.student-grade-viewing-workspace > :not(script):not(style),
.student-grade-audit-workspace > :not(script):not(style),
.student-my-records-workspace > :not(script):not(style),
.student-faculty-evaluation-workspace > :not(script):not(style) {
    animation: sims-workspace-enter .34s cubic-bezier(.22, .8, .32, 1) both;
}

.dashboard-workspace > :nth-child(2),
.student-my-info-wizard > :nth-child(2),
.student-course-enlistment-workspace > :nth-child(2),
.student-grade-viewing-workspace > :nth-child(2),
.student-grade-audit-workspace > :nth-child(2),
.student-my-records-workspace > :nth-child(2),
.student-faculty-evaluation-workspace > :nth-child(2) {
    animation-delay: 35ms;
}

.dashboard-workspace > :nth-child(3),
.student-my-info-wizard > :nth-child(3),
.student-course-enlistment-workspace > :nth-child(3),
.student-grade-viewing-workspace > :nth-child(3),
.student-grade-audit-workspace > :nth-child(3),
.student-my-records-workspace > :nth-child(3),
.student-faculty-evaluation-workspace > :nth-child(3) {
    animation-delay: 70ms;
}

.dashboard-workspace > :nth-child(4),
.student-my-info-wizard > :nth-child(4),
.student-course-enlistment-workspace > :nth-child(4),
.student-grade-viewing-workspace > :nth-child(4),
.student-grade-audit-workspace > :nth-child(4),
.student-my-records-workspace > :nth-child(4),
.student-faculty-evaluation-workspace > :nth-child(4) {
    animation-delay: 105ms;
}

.dashboard-workspace > :nth-child(n+5),
.student-my-info-wizard > :nth-child(n+5),
.student-course-enlistment-workspace > :nth-child(n+5),
.student-grade-viewing-workspace > :nth-child(n+5),
.student-grade-audit-workspace > :nth-child(n+5),
.student-my-records-workspace > :nth-child(n+5),
.student-faculty-evaluation-workspace > :nth-child(n+5) {
    animation-delay: 140ms;
}

@keyframes sims-workspace-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-workspace > :not(script):not(style),
    .student-my-info-wizard > :not(script):not(style),
    .student-course-enlistment-workspace > :not(script):not(style),
    .student-grade-viewing-workspace > :not(script):not(style),
    .student-grade-audit-workspace > :not(script):not(style),
    .student-my-records-workspace > :not(script):not(style),
    .student-faculty-evaluation-workspace > :not(script):not(style) {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Dashboard section headings use the shared workspace hierarchy. */
body .dashboard-workspace .dashboard-progress-heading h2,
body .dashboard-workspace .dashboard-trajectory-title h2,
body .dashboard-workspace .dashboard-section-heading h2 {
    font-size: var(--sims-font-section-title);
}

/* Desktop dashboard composition uses width efficiently instead of stacking every section. */
@media (min-width: 1200px) {
    body .dashboard-workspace {
        display: grid;
        grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
        align-items: start;
        align-content: start;
        column-gap: 12px;
        row-gap: var(--dashboard-card-gap, 14px);
        min-height: 100vh;
    }

    body .dashboard-workspace > .dashboard-student-header,
    body .dashboard-workspace > .dashboard-progress-panel {
        grid-column: 1 / -1;
        margin-top: 0;
        margin-bottom: 0;
    }

    body .dashboard-workspace > .dashboard-trajectory-panel {
        grid-column: 1;
        grid-row: 3 / span 2;
        min-width: 0;
        margin-top: 0;
    }

    body .dashboard-workspace > .dashboard-trajectory-panel + .dashboard-section {
        grid-column: 2;
        grid-row: 3;
        min-width: 0;
        margin-top: 0;
        padding: var(--dashboard-card-padding, 14px 16px);
        border-radius: var(--sims-radius, .5rem);
        background: var(--sims-component-bg, #ffffff);
        box-shadow: var(--sims-component-shadow, 0 1px 3px rgba(36, 55, 63, .08));
    }

    body .dashboard-workspace > .dashboard-trajectory-panel + .dashboard-section + .dashboard-section {
        grid-column: 2;
        grid-row: 4;
        min-width: 0;
        margin-top: 0;
    }

    body .dashboard-workspace > .dashboard-trajectory-panel + .dashboard-section + .dashboard-section + .dashboard-section {
        grid-column: 1 / -1;
        min-width: 0;
        margin-top: 0;
    }

    body .dashboard-workspace > .dashboard-trajectory-panel + .dashboard-section .dashboard-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: start;
    }

    body .dashboard-workspace > .dashboard-trajectory-panel + .dashboard-section .dashboard-action-item {
        background: var(--sims-control-bg, #f3f7f8);
        box-shadow: none;
    }

    body .dashboard-workspace > .dashboard-trajectory-panel + .dashboard-section + .dashboard-section .dashboard-account-grid {
        grid-template-columns: 1fr;
    }

    body .dashboard-workspace > .dashboard-trajectory-panel + .dashboard-section + .dashboard-section .dashboard-account-panel {
        grid-column: auto;
    }
}
