/* Student Calendar — extends Course Planner calendar chrome */

/* Above planner calendar cells (z-index 1–5), ctx menu (85), print overlay (90) */
.sc-impersonate-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
}
.sc-impersonate-modal.hidden {
    display: none !important;
}
.sc-impersonate-modal-panel {
    position: relative;
    z-index: 1;
    max-height: 90vh;
}

.sc-body .cp-brand-mark { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.cp-shell-no-sidebar .cp-main { margin-left: 0; max-width: none; }
.cp-shell-no-sidebar {
    display: block;
    min-height: 0;
    height: auto;
}
body.sc-has-impersonation-banner {
    --sc-banner-h: 3.25rem;
}
body.sc-has-impersonation-banner .cp-main.cp-has-cal-rail {
    height: calc(100vh - var(--cp-head, 52px) - var(--sc-banner-h, 0px));
    max-height: calc(100vh - var(--cp-head, 52px) - var(--sc-banner-h, 0px));
}
.sc-personal-zone { position: relative; min-height: 2.5rem; }
.sc-personal-zone .sc-add-day {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: none;
    background: #4f46e5;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
    z-index: 4;
}
.sc-personal-zone:hover .sc-add-day,
.sc-personal-zone:focus-within .sc-add-day { opacity: 1; transform: scale(1); }
.sc-chip-personal { border-left-color: var(--sc-p-color, #6366f1) !important; }
.sc-chip-personal .cp-chip-main { background: color-mix(in srgb, var(--sc-p-color, #6366f1) 14%, #fff); }
.sc-course-pick { display: flex; flex-direction: column; gap: 6px; max-height: min(42vh, 320px); overflow-y: auto; overflow-x: hidden; padding-right: 2px; }
.sc-course-pick-single label { cursor: pointer; }
.sc-course-pick label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
}
.sc-course-pick label:hover { background: #f1f5f9; }
.sc-course-pick input { margin-top: 3px; }
.sc-course-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; margin-top: 4px; }
.sc-modal-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e2e8f0; margin-bottom: 12px; }
.sc-modal-tabs button {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
}
.sc-modal-tabs button.is-active { color: #4f46e5; border-bottom-color: #4f46e5; }
.sc-lesson-modal-has-nb {
    width: min(1120px, 98vw);
    max-height: min(94vh, 62rem);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sc-lesson-modal-has-nb.is-notebook-tab {
    height: min(94vh, 62rem);
}
.sc-lesson-modal-has-nb .cp-nb-view-head,
.sc-lesson-modal-has-nb .sc-modal-tabs,
.sc-lesson-modal-has-nb .sc-lesson-nb-pick,
.sc-lesson-modal-has-nb .cp-nb-view-foot {
    flex-shrink: 0;
}
.sc-lesson-modal-has-nb .sc-modal-tabs {
    margin: 0 1rem;
    flex: 0 0 auto;
}
.sc-lesson-nb-pick {
    padding: 0 1rem 0.5rem;
    flex: 0 0 auto;
}
.sc-lesson-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1rem 1.25rem;
}
.sc-lesson-modal-has-nb .sc-lesson-body.is-nb-pane {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
}
.sc-lesson-modal-has-nb.is-notebook-tab .sc-lesson-body.is-nb-pane .cp-nb-view-frame {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #f8fafc;
}
.sc-lesson-nb-actions .cp-btn {
    font-size: 0.8rem;
    white-space: nowrap;
}
.sc-readonly-note { font-size: 12px; color: #64748b; margin-bottom: 12px; }
.sc-assignment-meta {
    display: grid;
    grid-template-columns: minmax(7rem, 9rem) 1fr;
    gap: 0.35rem 0.75rem;
    margin: 0 0 1rem;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    font-size: 0.875rem;
}
.sc-assignment-meta .sc-meta-row {
    display: contents;
}
.sc-assignment-meta dt {
    font-weight: 600;
    color: #64748b;
    margin: 0;
}
.sc-assignment-meta dd {
    margin: 0;
    color: #0f172a;
}
.sc-assignment-notes {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
}
.sc-assignment-modal-shell {
    width: min(520px, 96vw);
    max-height: min(90vh, 40rem);
    overflow: auto;
}
.sc-assignment-modal-wide {
    width: min(720px, 96vw);
    max-height: min(92vh, 44rem);
}
.sc-assignment-modal-handout {
    width: min(1040px, 98vw);
    max-height: 94vh;
}
.sc-assignment-modal-handout.is-handout-tab {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 94vh;
    height: min(94vh, 56rem);
    padding-top: 1rem;
    padding-bottom: 0.75rem;
}
.sc-assignment-modal-handout.is-handout-tab > .flex,
.sc-assignment-modal-handout.is-handout-tab > .sc-modal-tabs {
    flex-shrink: 0;
}
.sc-assignment-modal-handout.is-handout-tab #scAssignmentBody {
    flex: 1 1 auto;
    min-height: 0;
}
.sc-assignment-body-handout {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.sc-ws-handout-pane {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.35rem;
}
.sc-ws-handout-pane-hint {
    flex-shrink: 0;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #64748b;
    margin: 0;
}
.sc-ws-handout-pane-foot {
    flex-shrink: 0;
}
.sc-ws-handout-frame {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f1f5f9;
}
.sc-ws-handout-page {
    max-width: 52rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
}
html.sc-ws-handout-embed-root {
    height: 100%;
}
.sc-ws-handout-embed {
    margin: 0;
    background: #f8fafc;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sc-ws-handout-embed-inner {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0.35rem 0.35rem;
    box-sizing: border-box;
}
.sc-ws-handout-embed #contentPanel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.sc-ws-handout-embed .sc-ws-handout-toolbar {
    flex-shrink: 0;
}
.sc-ws-handout-preview-host {
    overflow: auto;
    max-height: calc(100vh - 6rem);
    background: #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem;
    flex: 1 1 auto;
    min-height: 0;
}
.sc-ws-handout-embed .sc-ws-handout-preview-host {
    max-height: none;
}
.sc-ws-handout-preview-host .ca-preview-screen {
    margin: 0 auto;
    transform-origin: top center;
}
.sc-ws-handout-zoom {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.35rem;
    padding-left: 0.5rem;
    border-left: 1px solid #e2e8f0;
}
.sc-ws-handout-zoom-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    min-width: 2.75rem;
    text-align: center;
}

.sc-ctx-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px 8px;
}
.sc-ctx-swatch {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
    background: var(--sw, #64748b);
    cursor: pointer;
    padding: 0;
}
.sc-ctx-swatch:hover {
    transform: scale(1.08);
}
.cp-chip.sc-event-highlight,
button.cp-span-mid.sc-event-highlight,
.cp-span-bar.sc-event-highlight,
.sc-chip-personal.sc-event-highlight {
    box-shadow: 0 0 0 2px #fbbf24, 0 0 14px 4px rgba(251, 191, 36, 0.45);
    position: relative;
    z-index: 3;
}
.cp-chip.is-thick-on,
.cp-span-bar.is-thick-on,
button.cp-span-mid.is-thick-on {
    outline: 2px dashed #4f46e5;
    outline-offset: 1px;
}
.sc-assignment-body-worksheet {
    max-height: min(60vh, 32rem);
    overflow: auto;
}
.sc-rubric-table-wrap {
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}
.sc-rubric-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.sc-rubric-table th,
.sc-rubric-table td {
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    vertical-align: top;
}
.sc-rubric-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
}
.sc-rubric-section td {
    background: #eef2ff;
    font-weight: 700;
    color: #312e81;
}
.sc-rubric-section-pct {
    font-weight: 600;
    color: #4338ca;
    margin-left: 0.35rem;
}
.sc-rubric-q { padding-left: 1rem !important; }
.sc-rubric-num { text-align: center !important; white-space: nowrap; }
.sc-rubric-score.is-high { color: #047857; font-weight: 700; }
.sc-rubric-score.is-mid { color: #b45309; font-weight: 700; }
.sc-rubric-score.is-low { color: #b91c1c; font-weight: 700; }
.sc-rubric-total td {
    font-weight: 800;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}
.sc-rubric-overall {
    padding: 0.65rem 0.75rem;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}
.sc-rubric-feedback {
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
}
.sc-ws-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.sc-ws-body {
    font-size: 0.875rem;
}
.sc-ws-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.65rem;
    background: #fff;
}
.sc-ws-item-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.35rem;
}
.sc-ws-subhead {
    font-weight: 700;
    margin: 0.75rem 0 0.35rem;
    color: #0f172a;
}
.cp-month-week .cp-span-layer,
.cp-week-board .cp-span-layer {
    z-index: 8;
}
button.cp-span-mid {
    border: none;
    background: transparent;
    font: inherit;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.sc-grade-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 700;
    font-size: 14px;
}
.sc-empty-state { text-align: center; padding: 48px 24px; color: #64748b; }
.sc-empty-state i { font-size: 2rem; color: #c7d2fe; margin-bottom: 12px; }
.sc-plans-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4f46e5;
    padding: 6px 10px;
    background: #eef2ff;
    border-radius: 8px;
    margin-bottom: 8px;
}
.sc-plans-loading .sc-spin {
    width: 16px;
    height: 16px;
    border: 2px solid #c7d2fe;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: sc-spin 0.7s linear infinite;
}
@keyframes sc-spin { to { transform: rotate(360deg); } }
