.direct-chat-image { display: block; max-width: 100%; padding: 0; margin: 0 0 7px; overflow: hidden; border: 0; border-radius: 10px; background: #111726; cursor: zoom-in; flex-shrink: 0; }
.direct-chat-image img { display: block; width: 100%; height: 100%; object-fit: contain; color: #f6f6fa; font-size: 12px; }
.direct-chat-preview { display: flex; align-items: center; flex: 0 0 auto; gap: 10px; padding: 8px 16px; color: var(--ink); border-top: 1px solid var(--line); }
.direct-chat-preview[hidden] { display: none; }
.direct-chat-preview img { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; background: #111726; }
.direct-chat-preview span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.direct-chat-preview button { border: 0; border-radius: 10px; min-height: 40px; min-width: 40px; background: var(--surface-2, #222b3d); color: var(--ink); cursor: pointer; }
.student-direct-chat-form .direct-chat-attach, .teacher-direct-chat-compose .direct-chat-attach { display: grid; place-items: center; width: 44px; height: 46px; flex: 0 0 44px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, #222b3d); color: var(--ink); cursor: pointer; }
.direct-chat-attach:disabled { opacity: .5; cursor: default; }
.teacher-direct-chat-compose { grid-template-columns: 44px minmax(0, 1fr) auto; }
.direct-chat-lightbox { max-width: 96vw; max-height: 96dvh; padding: 12px; border: 1px solid #343d52; border-radius: 15px; background: #111726; color: #f6f6fa; }
.direct-chat-lightbox::backdrop { background: #070b15df; }
.direct-chat-lightbox > img { display: block; max-width: 90vw; max-height: calc(90dvh - 60px); object-fit: contain; }
.direct-chat-lightbox > button { display: block; margin: 0 0 10px auto; padding: 10px 18px; border: 0; border-radius: 8px; background: #222b3d; color: #f6f6fa; cursor: pointer; }
.student-direct-chat-panel { position: relative; }
.student-direct-chat-jump { position: absolute; right: 16px; bottom: 98px; z-index: 1; padding: 9px 14px; border: 1px solid #7565a0; border-radius: 24px; color: #f6f6fa; background: #35335d; cursor: pointer; font-size: 12px; }
.student-direct-chat-message, .teacher-direct-chat-message, .student-direct-chat-date, .teacher-direct-chat-day { flex-shrink: 0; }
@media (max-width: 760px) { .student-direct-chat-jump { bottom: 78px; } }
