Files
makelore/src/pages/Chat/classroom-workspace.css
T

160 lines
21 KiB
CSS

/* Approved playful Code workbench. Keep navigation skins scoped to /chat. */
[data-testid="main-layout"][data-classroom="true"], .classroom-workspace {
--background: 0 0% 100%; --foreground: 214 34% 23%;
--muted-foreground: 214 16% 44%; --border: 213 31% 90%;
}
[data-testid="main-layout"][data-classroom="true"] [data-testid="titlebar-sidebar-surface"] { background: #f3f7fb; border-color: #dde5ee; box-shadow: none; backdrop-filter: none; }
[data-testid="sidebar"][data-classroom="true"] { background: #f3f7fb; border-color: #dde5ee; box-shadow: none; backdrop-filter: none; color: #26384d; }
[data-testid="sidebar"][data-classroom="true"] .classroom-sidebar-header { padding-top: 0; padding-bottom: 0; }
[data-testid="sidebar"][data-classroom="true"] [data-testid="classroom-sidebar-navigation"] { align-items: center; }
[data-testid="sidebar"][data-classroom="true"] .classroom-brand { height: 46px; gap: 10px; padding: 0 2px; }
[data-testid="sidebar"][data-classroom="true"] .classroom-sidebar-header .community-link[data-variant="sidebar"] { min-height: 41px; margin-top: 10px; gap: 9px; padding: 8px 11px; border: 1px solid #d5e1ed; border-radius: 11px; background: #f8faf5; box-shadow: 0 3px 0 #e3eaf3; font-size: 14px; font-weight: 500; line-height: 20px; white-space: normal; }
[data-testid="sidebar"][data-classroom="true"] .classroom-sidebar-header .community-link[data-variant="sidebar"]:hover:not(:disabled) { background: #eef3e7; border-color: #b7c6a4; }
[data-testid="sidebar"][data-classroom="true"] .classroom-brand:hover { background: #eaf1f8; }
.classroom-brand-mark { display: grid; place-items: center; width: 40px; height: 42px; flex-shrink: 0; border: 1px solid #f1d1aa; border-radius: 12px; background: #fff0dd; box-shadow: 0 3px 0 #ecdbc5; }
.classroom-brand-caption { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #64758a; }
[data-testid="sidebar"][data-classroom="true"] .classroom-sidebar-content { padding: 10px 12px 14px; }
[data-testid="sidebar"][data-classroom="true"] [data-testid="sidebar-create-project"] { min-height: 41px; gap: 9px; padding: 8px 11px; border: 1px solid #d5e1ed; border-radius: 11px; background: #fff; color: #304968; box-shadow: 0 3px 0 #e3eaf3; }
[data-testid="sidebar"][data-classroom="true"] [data-testid="sidebar-create-project"] svg { color: #c44b23; }
[data-testid="sidebar"][data-classroom="true"] [data-testid="sidebar-create-project"]:hover { background: #fff7ef; border-color: #ecc5a5; }
[data-testid="sidebar"][data-classroom="true"] .classroom-projects { margin-top: 8px; }
[data-testid="sidebar"][data-classroom="true"] .classroom-projects-heading { padding: 6px 3px; color: #64758a; }
[data-testid="sidebar"][data-classroom="true"] .classroom-projects-heading > svg { display: none; }
[data-testid="sidebar"][data-classroom="true"] .classroom-project-card { min-height: 56px; gap: 9px; padding: 8px; border: 1px solid transparent; border-radius: 13px; }
[data-testid="sidebar"][data-classroom="true"] .classroom-project-card:hover { background: #fff; }
[data-testid="sidebar"][data-classroom="true"] .classroom-project-card[aria-current="page"] { background: #fff; border-color: #c9d9e9; box-shadow: 0 3px 0 #e2eaf3; }
.classroom-project-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 37px; border-radius: 10px; background: #ffead9; color: #a85026; }
.classroom-project-icon svg { width: 21px; height: 21px; }
.classroom-project-icon[data-tone="green"] { background: #e1f1d9; color: #507d39; }
.classroom-project-icon[data-tone="blue"] { background: #deedfb; color: #3a6d9d; }
[data-testid="sidebar"][data-classroom="true"] [data-testid="project-conversations"] { padding: 8px 0 4px; font-size: 13px; }
[data-testid="sidebar"][data-classroom="true"] .classroom-conversation-actions { gap: 2px; margin-bottom: 4px; color: #64758a; }
[data-testid="sidebar"][data-classroom="true"] .classroom-conversation-actions button { min-height: 32px; min-width: 30px; border-radius: 8px; }
[data-testid="sidebar"][data-classroom="true"] .classroom-conversation-actions button:hover { background: #e5edf6; color: #36557b; }
[data-testid="sidebar"][data-classroom="true"] .classroom-conversation-row { margin: 3px 0; border: 1px solid transparent; border-radius: 10px; color: #64758a; }
[data-testid="sidebar"][data-classroom="true"] .classroom-conversation-row:hover { background: #eaf1f8; }
[data-testid="sidebar"][data-classroom="true"] .classroom-conversation-row[data-selected="true"] { background: #e0ecfa; border-color: #cedef0; color: #304f75; }
[data-testid="sidebar"][data-classroom="true"] .classroom-conversation-row > button:first-child { min-height: 35px; gap: 7px; }
[data-testid="sidebar"][data-classroom="true"] .classroom-conversation-row > button:first-child > svg { color: #7891af; }
[data-testid="sidebar"][data-classroom="true"] .classroom-account-footer { padding: 10px 10px 12px; border-top: 1px solid #dde5ee; background: #edf3f9; }
[data-testid="sidebar"][data-classroom="true"] [data-testid="sidebar-member-menu-trigger"] { min-height: 42px; border: 1px solid #d9e3ee; border-radius: 11px; background: #fff; font-size: 12px; }
.classroom-workspace [data-testid="coding-conversation-header"] { border-bottom-color: #e8edf3; background: #fff; color: #304968; }
.classroom-tabs { display: flex; flex-shrink: 0; height: 46px; gap: 9px; padding: 6px 22px; border-bottom: 1px solid #e8edf3; }
.classroom-workspace-toolbar { display: flex; flex-wrap: wrap; flex-shrink: 0; align-items: center; gap: 6px 12px; min-height: 46px; padding: 6px 22px; border-bottom: 1px solid #e8edf3; }
.classroom-workspace-toolbar > .classroom-tabs { height: 32px; padding: 0; border-bottom: 0; }
.classroom-browser-toolbar { flex: 1 1 220px; min-width: min(220px, 100%); }
.classroom-tabs button { display: flex; align-items: center; gap: 7px; position: relative; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; background: #f4f7fa; font-size: 12px; color: #62738b; }
.classroom-tabs button:hover { background: #eaf1f8; }
.classroom-tabs button[aria-selected="true"] { background: #eaf1fb; border-color: #ccdaeb; color: #36557b; box-shadow: 0 2px 0 #dce6f3; }
.classroom-chat-view:not([hidden]), .classroom-work-view:not([hidden]) { display: flex; }
.classroom-chat-view[hidden], .classroom-work-view[hidden] { display: none; }
.classroom-workspace [data-testid="coding-message-composer"] { max-width: 740px; }
.classroom-workspace [data-testid="coding-message-composer"], .classroom-workspace .consultation-pane > form { padding-bottom: 22px; }
.classroom-workspace .chat-composer-surface { border-color: #d3dfeb; border-bottom-width: 3px; border-radius: 14px; box-shadow: 0 3px 12px #3a557806; }
.classroom-workspace [data-testid="coding-conversation-timeline"] { padding-top: 30px; }
.classroom-work-view [data-testid="agent-browser-panel"] { border: 1px solid #dce5ef; border-radius: 12px; }
.classroom-consultation-dock { border-color: #dde5ee; max-width: min(55vw, 640px); }
.classroom-consultation-resizer { position: absolute; inset: 0 auto 0 -4px; width: 8px; z-index: 2; cursor: col-resize; }
.classroom-consultation-resizer:hover, .classroom-consultation-resizer:focus-visible { background: #7994b533; }
.consultation-pane { background: #fffdf8; color: #30465f; }
.consultation-retry { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; min-height: 44px; max-width: 100%; padding: 8px 16px; border: 1.5px solid #e3ce8f; border-radius: 16px 16px 16px 6px; background: #fff2c9; color: #6f5127; box-shadow: 0 3px 0 #e7d7a6, inset 0 1px 0 #fff9e8; font-size: 14px; font-weight: 600; line-height: 24px; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.consultation-retry:hover:not(:disabled) { background: #ffe9a9; border-color: #d6b76f; }
.consultation-retry:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #e7d7a6, inset 0 1px 0 #fff9e8; }
.consultation-shortcuts { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-height: min(192px, 24vh); overflow-y: auto; margin-bottom: 2px; padding: 3px 4px 6px; }
.consultation-hint { --hint-color: #37679d; --hint-hover: #284f7b; --hint-active: #203f63; display: inline-flex; flex-shrink: 0; align-items: center; gap: 7px; max-width: 100%; min-height: 30px; padding: 4px 2px; border: 0; border-radius: 4px; background: transparent; box-shadow: none; color: var(--hint-color); font-size: 13px; font-weight: 600; text-shadow: 0 1px 1px color-mix(in srgb, currentColor 25%, transparent); line-height: 22px; text-align: left; white-space: normal; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer; transition: color 150ms ease, text-decoration-color 150ms ease; }
.consultation-hint:nth-child(8n + 2) { --hint-color: #8061a0; --hint-hover: #664a83; --hint-active: #503865; }
.consultation-hint:nth-child(8n + 3) { --hint-color: #91631d; --hint-hover: #744d12; --hint-active: #5a3b0d; }
.consultation-hint:nth-child(8n + 4) { --hint-color: #34786c; --hint-hover: #265e54; --hint-active: #1c4941; }
.consultation-hint:nth-child(8n + 5) { --hint-color: #a35470; --hint-hover: #854059; --hint-active: #693046; }
.consultation-hint:nth-child(8n + 6) { --hint-color: #626ba0; --hint-hover: #4d5684; --hint-active: #3c4369; }
.consultation-hint:nth-child(8n + 7) { --hint-color: #a85c3d; --hint-hover: #87472d; --hint-active: #6b3621; }
.consultation-hint:nth-child(8n + 8) { --hint-color: #617735; --hint-hover: #4b5f27; --hint-active: #3a4a1c; }
.consultation-hint::after { content: ''; width: 5px; height: 5px; flex-shrink: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); opacity: 0.7; }
.consultation-hint:hover:not(:disabled) { color: var(--hint-hover); text-decoration-color: currentColor; }
.consultation-hint:active:not(:disabled) { color: var(--hint-active); }
.consultation-hint:focus-visible { outline: 2px solid #71845f; outline-offset: 3px; text-decoration-color: currentColor; }
.consultation-hint:disabled, .consultation-retry:disabled { cursor: not-allowed; opacity: 0.5; }
@media (prefers-reduced-motion: reduce) { .consultation-hint, .consultation-retry { transition: none; } .consultation-retry:active:not(:disabled) { transform: none; } }
.consultation-pane button:focus-visible { outline: 2px solid #71845f; outline-offset: 3px; }
.consultation-suggestion { border-color: #e0e6d6; color: #718163; }
.consultation-suggestion:hover { border-color: #bac9aa; background: #f4f7ee; }
.consultation-follow-ups { display: flex; flex-direction: column; gap: 8px; }
.consultation-follow-up { --card-background: #eef5ff; --card-hover: #e2edfc; --card-border: #d3e3f7; display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--card-background); color: #344963; font-size: 14px; line-height: 1.7; text-align: left; overflow-wrap: anywhere; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease; }
.consultation-follow-up > svg { width: 14px; height: 14px; }
.consultation-follow-up:nth-child(3n + 2) { --card-background: #fff4dc; --card-hover: #ffedc5; --card-border: #eeddb5; }
.consultation-follow-up:nth-child(3n + 3) { --card-background: #f3edfc; --card-hover: #eae0f8; --card-border: #e2d7f2; }
.consultation-follow-up:hover:not(:disabled) { background: var(--card-hover); }
.consultation-follow-up:disabled { cursor: not-allowed; opacity: 0.5; }
.consultation-pane .consultation-follow-up:focus-visible { outline-color: #6683a5; }
.consultation-user { background: #eaf0e1; }
.consultation-composer { border-color: #dce3d3; border-bottom-width: 3px; }
.consultation-send { background: #536947; }
@media (max-width: 1100px) { .classroom-tabs, .classroom-workspace-toolbar { padding-left: 18px; padding-right: 18px; } .classroom-workspace-toolbar > .classroom-tabs { padding: 0; } }
@media (max-width: 900px) { .classroom-consultation-dock { position: absolute; inset: 0 0 0 auto; z-index: 45; max-width: 100%; box-shadow: -12px 0 36px #24311b0d; } .classroom-consultation-resizer { display: none; } }
@media (max-width: 600px) { .classroom-consultation-dock { width: 100%!important; } .classroom-workspace [data-testid="coding-message-composer"] { width: calc(100% - 24px); } }
@media (prefers-reduced-motion: reduce) { .classroom-workspace *, .consultation-pane * { scroll-behavior: auto!important; } }
@media (prefers-reduced-motion: reduce) { .consultation-follow-up { transition: none; } }
/* The teacher speaks from the title bar without taking the student's focus. */
.classroom-composer-view[hidden] { display: none; }
.teacher-companion { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 65%; }
.teacher-introduction { z-index: 200; width: min(304px, calc(100vw - 24px)); max-height: var(--radix-tooltip-content-available-height); padding: 18px; border: 2px solid #ead6af; border-radius: 22px; background: #fff9ed; color: #30465f; box-shadow: 0 5px 0 #ecdcc1, 0 12px 30px #354d6c18; transform-origin: var(--radix-tooltip-content-transform-origin); animation: teacher-introduction-in 150ms ease-out; }
.teacher-introduction-heading { display: flex; align-items: center; gap: 11px; }
.teacher-introduction-avatar { width: 48px; height: 48px; flex-shrink: 0; border: 2px solid #fff; border-radius: 15px; background: #e8f1fb; box-shadow: 0 3px 0 #d6e3ee; }
.teacher-introduction-eyebrow { display: block; margin-bottom: 3px; color: #856637; font-size: 11px; font-weight: 500; }
.teacher-introduction-name { overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; font-weight: 600; }
.teacher-introduction-sparkles { align-self: flex-start; width: 19px; height: 19px; flex-shrink: 0; color: #b9842f; }
.teacher-introduction-description { max-height: min(240px, calc(var(--radix-tooltip-content-available-height) - 152px)); overflow-y: auto; overflow-wrap: anywhere; white-space: pre-wrap; margin-top: 16px; padding: 12px 13px; border: 1px solid #eee1c9; border-radius: 14px; background: #fffdf8; color: #48596e; font-size: 13px; line-height: 1.8; }
.teacher-introduction-hint { margin-top: 12px; color: #776649; font-size: 11px; text-align: center; }
.teacher-introduction-arrow { fill: #ead6af; }
@keyframes teacher-introduction-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .teacher-introduction { animation: none; } }
.consultation-agent-tabs { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.consultation-agents-refresh { display: flex; align-items: center; justify-content: center; gap: 5px; flex-shrink: 0; width: 76px; height: 32px; border: 1px solid #dce4d5; border-radius: 8px; color: #526348; background: #f7f9f3; font-size: 12px; white-space: nowrap; cursor: pointer; transition: background 150ms; }
.consultation-agents-refresh:hover:not(:disabled) { background: #eaf0e1; }
.consultation-agents-refresh:disabled { cursor: default; opacity: .6; }
.consultation-agent-tabs .teacher-companion-person { flex-shrink: 0; }
.teacher-companion-person { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px; border-radius: 8px; color: #747d6c; transition: background 150ms; }
.teacher-companion-person:hover, .teacher-companion-person[aria-expanded="true"] { background: #eef1e8; color: #42543a; }
.teacher-companion-avatar { position: relative; flex-shrink: 0; }
.teacher-companion-person img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.teacher-companion-name { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.teacher-companion-unread { position: absolute; top: -2px; right: -3px; width: 7px; height: 7px; border: 1.5px solid white; border-radius: 50%; background: #789560; }
.teacher-companion button:focus-visible { outline: 2px solid #71845f; outline-offset: 3px; }
.teacher-companion-presence { position: absolute; top: calc(100% + 12px); right: 0; z-index: 90; display: flex; align-items: flex-start; gap: 8px; width: 288px; max-width: calc(100vw - 48px); }
.teacher-companion-bubble { position: relative; flex: 1; min-width: 0; padding: 10px 12px 8px; border: 1px solid #e3e7db; border-radius: 12px; background: #fffefa; box-shadow: 0 5px 18px #34483212; }
.teacher-companion-bubble::after { content: ''; position: absolute; top: 20px; right: -5px; width: 9px; height: 9px; transform: rotate(45deg); border-top: 1px solid #e3e7db; border-right: 1px solid #e3e7db; background: #fffefa; }
.teacher-companion-bubble-heading { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.teacher-companion-invitation-label { flex: 1; min-width: 0; color: #687163; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-companion-dismiss { display: grid; place-items: center; width: 24px; height: 24px; margin: -4px -5px -4px 0; border-radius: 5px; color: #687163; }
.teacher-companion-dismiss:hover { background: #f2f5eb; }
.teacher-companion-message { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; color: #27382b; }
.teacher-companion-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.teacher-companion-actions button { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; color: #4d663c; font-size: 12px; font-weight: 500; }
.teacher-companion-actions button:last-child { color: #79836f; font-weight: 400; }
.teacher-companion-actions button:hover { text-decoration: underline; text-underline-offset: 4px; }
.teacher-companion-speaker { flex-shrink: 0; width: 48px; height: 48px; margin-top: 5px; border-radius: 8px; }
.teacher-companion-speaker img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 3px 1px #33485820); }
.teacher-welcome-presence { position: absolute; top: calc(100% + 12px); right: 0; z-index: 90; width: 340px; max-width: calc(100vw - 40px); }
.teacher-welcome-list { display: grid; gap: 10px; max-height: min(440px, calc(100vh - 200px)); overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 8px; scrollbar-width: thin; }
.teacher-welcome-card { --welcome-fill: #fff3ce; --welcome-edge: #efddb0; display: flex; align-items: flex-start; gap: 10px; min-width: 0; animation: teacher-welcome-arrive 220ms ease-out backwards; animation-delay: var(--welcome-delay, 0ms); }
.teacher-welcome-card[data-tone="1"] { --welcome-fill: #edf5ff; --welcome-edge: #d7e5f5; }
.teacher-welcome-card[data-tone="2"] { --welcome-fill: #f3edfc; --welcome-edge: #e5d9f5; }
.teacher-welcome-avatar { flex-shrink: 0; width: 42px; height: 44px; margin-top: 8px; padding: 2px; border: 1px solid var(--welcome-edge); border-radius: 14px; background: #fff; box-shadow: 0 3px 0 var(--welcome-edge); cursor: pointer; }
.teacher-welcome-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.teacher-welcome-bubble { position: relative; flex: 1; min-width: 0; }
.teacher-welcome-open::before { content: ''; position: absolute; top: 23px; left: -5px; width: 8px; height: 8px; transform: rotate(45deg); border-left: 1px solid var(--welcome-edge); border-bottom: 1px solid var(--welcome-edge); background: var(--welcome-fill); }
.teacher-welcome-open { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--welcome-edge); border-radius: 17px 17px 17px 6px; background: var(--welcome-fill); box-shadow: 0 2px 0 var(--welcome-edge); color: #34465c; text-align: left; cursor: pointer; }
.teacher-welcome-open:hover { filter: brightness(1.015); }
.teacher-welcome-open:focus-visible, .teacher-welcome-dismiss:focus-visible, .teacher-welcome-avatar:focus-visible { outline: 2px solid #547ab0; outline-offset: 3px; }
.teacher-welcome-name { padding-right: 20px; font-size: 13px; font-weight: 600; line-height: 19px; overflow-wrap: anywhere; }
.teacher-welcome-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 13px; line-height: 1.6; }
.teacher-welcome-action { display: inline-flex; align-items: center; gap: 3px; color: #596b55; font-size: 11px; line-height: 18px; }
.teacher-welcome-dismiss { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 30px; height: 30px; color: #6e776b; border-radius: 10px; cursor: pointer; }
.teacher-welcome-dismiss:hover { background: #ffffff90; }
@keyframes teacher-welcome-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .teacher-welcome-card { animation: none; } }
@media (max-width: 600px) { .teacher-welcome-presence { position: fixed; top: 64px; right: 12px; max-width: calc(100vw - 24px); } }
/* Native preview clearance is measured against the bubble, not the whole pane. */
@media (max-height: 650px) { .teacher-companion-bubble { padding-top: 9px; } .teacher-companion-message { -webkit-line-clamp: 2; } }