/* Finalize modal — multi-tab end-of-class commit ritual.
   Tabs: Submissions / Reflection / Materials / Student Updates.
   Title carries scheduled chip; Schedule button top-right of the title bar.
   Footer: Cancel · Schedule for later · Finalize now. */

.tc-fmodal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 17, 23, 0.55);
    z-index: 9100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: tc-fmodal-fade .14s ease-out;
}
.tc-fmodal-overlay.open { display: flex; }
@keyframes tc-fmodal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tc-fmodal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.10);
    width: min(960px, 100%);
    height: min(720px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tc-fmodal-pop .16s ease-out;
}
@keyframes tc-fmodal-pop {
    from { transform: translateY(8px) scale(0.985); opacity: 0; }
    to   { transform: translateY(0) scale(1);       opacity: 1; }
}

/* ----- Title bar ----- */
.tc-fmodal-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}
.tc-fmodal-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #868e96;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.tc-fmodal-title {
    flex: 1;
    min-width: 0;
}
.tc-fmodal-title-main {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tc-fmodal-title-sub {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}
.tc-fmodal-sched-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff4cf;
    color: #856404;
    border: 1px solid #ffd43b;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    cursor: pointer;
}
.tc-fmodal-sched-chip:hover { filter: brightness(0.97); }
.tc-fmodal-sched-chip-x {
    font-size: 13px;
    line-height: 1;
    margin-left: 2px;
    color: #b08400;
}

.tc-fmodal-titlebar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.tc-fmodal-schedbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.tc-fmodal-schedbtn:hover { background: #f8f9fa; }
.tc-fmodal-close {
    background: transparent;
    border: none;
    color: #868e96;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
}
.tc-fmodal-close:hover { background: #f1f3f5; color: #495057; }

/* ----- Tabs ----- */
.tc-fmodal-tabs {
    display: flex;
    gap: 2px;
    padding: 0 20px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
    background: #fafafa;
}
.tc-fmodal-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tc-fmodal-tab:hover { color: #495057; }
.tc-fmodal-tab.active {
    color: #1971c2;
    border-bottom-color: #1971c2;
    background: #fff;
}
.tc-fmodal-tab-count {
    background: #e9ecef;
    color: #495057;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    line-height: 1.4;
}
.tc-fmodal-tab.active .tc-fmodal-tab-count { background: #d0ebff; color: #1864ab; }

/* ----- Body ----- */
.tc-fmodal-body {
    flex: 1;
    overflow: auto;
    padding: 18px 20px;
    background: #fff;
}
.tc-fmodal-pane { display: none; }
.tc-fmodal-pane.active { display: block; }

.tc-fmodal-stub {
    border: 1px dashed #dee2e6;
    border-radius: 10px;
    padding: 28px 20px;
    color: #868e96;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
    background: #fafafa;
}
.tc-fmodal-stub-title {
    color: #495057;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
}

.tc-fmodal-banner {
    background: #fff8e1;
    border: 1px solid #ffe69c;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 14px;
    color: #6b5300;
    font-size: 12.5px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tc-fmodal-banner-strong { color: #4f3c00; font-weight: 700; }
.tc-fmodal-banner-action {
    margin-left: auto;
    background: transparent;
    border: 1px solid #b08400;
    color: #6b5300;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.tc-fmodal-banner-action:hover { background: rgba(176, 132, 0, 0.08); }

/* ----- Footer ----- */
.tc-fmodal-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #e9ecef;
    background: #fafafa;
    flex-shrink: 0;
}
.tc-fmodal-footer-spacer { flex: 1; }
.tc-fmodal-btn {
    background: #fff;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tc-fmodal-btn:hover { background: #f8f9fa; }
.tc-fmodal-btn-primary {
    background: #2b8a3e;
    color: #fff;
    border-color: #2b8a3e;
}
.tc-fmodal-btn-primary:hover { background: #237032; border-color: #237032; }
.tc-fmodal-btn:disabled,
.tc-fmodal-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ----- Schedule picker (inline panel) ----- */
.tc-fmodal-sched-panel {
    position: absolute;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 14px 14px 12px;
    z-index: 9120;
    min-width: 260px;
}
.tc-fmodal-sched-panel-title {
    font-size: 11px;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.tc-fmodal-sched-panel input[type="datetime-local"] {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}
.tc-fmodal-sched-panel-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.tc-fmodal-sched-preset {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    color: #495057;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}
.tc-fmodal-sched-preset:hover { background: #e9ecef; }
.tc-fmodal-sched-panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f1f3f5;
}

/* Read-only banner shown when lesson is already finalized */
.tc-fmodal-readonly-banner {
    background: #d3f9d8;
    border: 1px solid #8ce99a;
    color: #1e6b32;
}
