/* Shared site type, colors and navigation are supplied by base.html. */
.surf-custom-emoji { display:inline-block; width:1.55em; height:1.55em; max-width:none; object-fit:contain; vertical-align:-.35em; margin:0 .06em; }
.message-actions .surf-custom-emoji { width:22px; height:22px; margin:0; }
.message-actions [data-action="react"] { display:inline-flex; align-items:center; gap:3px; }
#emoji-picker { position:fixed; display:flex; flex-direction:column; bottom:auto; margin:0; padding:12px; width:368px; max-width:calc(100vw - 16px); max-height:min(440px,calc(100dvh - 24px)); z-index:24000; color:var(--ink); background:var(--bg,#fff); border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 40px #08293430; text-align:left; }
#emoji-picker button { width:auto; height:auto; min-height:36px; border:0; background:transparent; color:inherit; border-radius:7px; font:inherit; }
#emoji-picker button:hover { background:#0a6c8520; }
#emoji-picker button:focus-visible { outline:2px solid var(--teal-light,#1a8aa6); outline-offset:-2px; }
.emoji-header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px; }
.emoji-header strong { font-size:1rem; }
#emoji-picker .emoji-header button { min-width:36px; font-size:1.4rem; line-height:1; }
#emoji-picker input { width:100%; flex:none; min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:transparent; font-size:.875rem; }
.emoji-categories { display:flex; gap:4px; padding:8px 0; flex:none; }
#emoji-picker .emoji-categories button { flex:1; padding:6px; font-size:.75rem; font-weight:700; }
#emoji-picker .emoji-categories button[aria-pressed="true"] { color:var(--accent-dark,#0a4a5e); background:#0a6c851a; }
.emoji-results { overflow:auto; min-height:70px; overscroll-behavior:contain; flex:1; }
.emoji-results h3 { margin:8px 4px; font-size:.6875rem; letter-spacing:.06em; text-transform:uppercase; color:var(--text-mid,#637784); }
.emoji-grid { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:2px; margin-bottom:10px; }
#emoji-picker .emoji-choice { display:flex; justify-content:center; align-items:center; min-width:0; min-height:40px; padding:3px 0; font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif; font-size:25px; line-height:1; }
#emoji-picker .emoji-choice .surf-custom-emoji { width:32px; height:32px; margin:0; }
.emoji-caption { flex:none; min-height:34px; padding:10px 4px 0; border-top:1px solid var(--line); font-size:.6875rem; line-height:1.5; color:var(--text-mid,#637784); }
.emoji-empty { padding:10px 4px; font-size:.8125rem; color:var(--text-mid,#637784); }
@media (max-width:420px) { .emoji-grid { grid-template-columns:repeat(7,minmax(0,1fr)); } }
@media (pointer:coarse) { #emoji-picker button,#emoji-picker .emoji-choice { min-height:44px; } }
.chat-authenticated > .footer { display:none; }
.chat-authenticated .app-shell { width:100%; max-width:none; margin:0; border-inline:0; grid-template-columns:var(--sidebar-width,320px) 6px minmax(0,1fr); }
.sidebar { min-width:0; min-height:0; }
.sidebar-top,.sidebar-search-action,.sidebar-bottom { flex:none; }
.conversation-list { min-height:0; flex:1 1 0; overscroll-behavior:contain; }
.pane-resizer { position:relative; align-self:stretch; flex:0 0 6px; background:#25424e; cursor:col-resize; touch-action:none; user-select:none; z-index:5; }
.pane-resizer::before { content:''; position:absolute; inset:0 -5px; }
.pane-resizer::after { content:''; position:absolute; width:2px; height:32px; top:calc(50% - 16px); left:2px; border-radius:2px; background:#82b2c3; opacity:.5; }
.pane-resizer:hover::after,.pane-resizer:focus-visible::after { opacity:1; background:var(--sand); }
.pane-resizing,.pane-resizing * { cursor:col-resize!important; user-select:none!important; }
.thread-resizer { display:none; }
.thread-open:not(.narrow-thread) > .thread-resizer { display:block; }
.workspace-grid.thread-open.narrow-thread .channel-pane { display:none; }
.workspace-grid.thread-open.narrow-thread .thread-panel { width:100%; border-left:0; }
.draft-status { color:var(--text-mid); font-size:.6875rem; line-height:1.5; margin:5px 0 0; }
.draft-status:empty { display:none; }
.sidebar-intro { margin:6px 8px 20px; }
.sidebar-intro h2 { font:2rem/1.1 'Bebas Neue',sans-serif; letter-spacing:.03em; }
.sidebar-search-action { text-align:left; border:0; background:transparent; color:#b9d4dc; padding:7px 26px; font-size:.8125rem; }
.sidebar-search-action:hover { background:#ffffff0c; color:#fff; }
.conversation-section { margin:17px 10px 7px; color:#9fc1cd; font:700 .625rem/1.5 'Space Mono',monospace; letter-spacing:.1em; text-transform:uppercase; }
.conversation-item { min-height:61px; }
.channel-glyph { display:grid; place-items:center; width:30px; flex:none; color:#8dc1cf; font:1.4rem/1 'Space Mono',monospace; }
.conversation-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-grid { flex:1; display:flex; min-width:0; min-height:0; overflow:hidden; }
.channel-pane { display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; }
.message-scroll { padding:24px clamp(16px,3vw,40px); }
.composer-area { padding:12px 18px; }
.rich-editor { display:block; width:100%; min-height:80px; max-height:240px; overflow:auto; padding:14px; outline:none; text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; font:1rem/1.6 'DM Sans',sans-serif; color:var(--ink); cursor:text; }
.rich-editor:empty::before { content:attr(data-placeholder); color:var(--text-mid); pointer-events:none; }
.rich-editor[contenteditable="false"] { opacity:.65; cursor:default; }
.rich-editor:focus-visible { outline:2px solid var(--teal-light); outline-offset:-2px; }
.rich-editor p { margin:0 0 6px; }
.rich-editor ul,.rich-editor ol,.rich-message ul,.rich-message ol { padding-left:24px; margin:8px 0; }
.rich-editor ul { list-style:disc; }.rich-editor ol { list-style:decimal; }
.rich-editor ul[data-list-style="dash"],.rich-message ul[data-list-style="dash"] { list-style:'–  '; }
.rich-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:2px; }
.rich-toolbar button { display:inline-flex; align-items:center; justify-content:center; height:30px; min-width:29px; padding:4px 6px; color:var(--text-mid); border:1px solid transparent; background:transparent; border-radius:4px; font-size:.75rem; line-height:1; cursor:pointer; }
.rich-toolbar button:hover,.rich-toolbar button:focus-visible { background:var(--teal-pale); color:var(--teal); border-color:var(--border); }
.rich-toolbar .color-tool { display:flex; position:relative; align-items:center; justify-content:center; height:30px; width:30px; margin:0!important; font-size:1rem; font-weight:700; border-bottom:3px solid var(--teal-light); color:var(--text); cursor:pointer; }
.rich-toolbar .color-tool input { position:absolute; opacity:0; inset:0; width:100%!important; height:100%!important; padding:0; cursor:pointer; }
.composer-toolbar { gap:6px; flex-wrap:wrap; border-top:1px solid var(--border); padding:6px 8px; }
.composer-toolbar .format-tools { flex:1 1 300px; }
.composer-toolbar #schedule-button { min-height:32px; font-size:.6875rem; }
.composer-caption { display:flex; justify-content:space-between; flex-wrap:wrap; gap:5px; text-align:left; }
.rich-message { white-space:normal; overflow-wrap:anywhere; }
.rich-message p { margin:0 0 8px; white-space:pre-wrap; }
.rich-message p:last-child { margin-bottom:0; }
.rich-message ul { list-style:disc; }.rich-message ol { list-style:decimal; }
.rich-message li { margin:3px 0; }
.rich-message a { text-decoration:underline; }
.rich-message blockquote { border-left:3px solid var(--teal-light); padding:4px 12px; margin:8px 0; }
.rich-message pre,.rich-editor pre { background:#102a35; color:#e0f1f6; overflow:auto; white-space:pre; padding:14px; margin:0 0 12px; border-radius:0 0 6px 6px; font: .8125rem/1.7 'Space Mono',monospace; tab-size:4; }
.rich-message pre code { background:transparent; color:inherit; padding:0; white-space:pre; font:inherit; }
.code-label { display:flex; align-items:center; justify-content:space-between; gap:18px; background:#1e4150; color:#c2e2ec; padding:6px 12px; margin-top:10px; border-radius:6px 6px 0 0; font:.6875rem/1.4 'Space Mono',monospace; }
.code-label button { background:transparent; border:1px solid #6a919e; border-radius:4px; color:inherit; padding:3px 6px; font:inherit; }
.thread-count { display:block; margin-top:10px; padding:5px 0; color:var(--accent-dark); background:transparent; border:0; text-align:left; font-size:.8125rem; font-weight:700; }
.edited-label { display:block; color:var(--text-mid); font-size:.625rem; margin-top:4px; }
.message-bubble { -webkit-touch-callout:none; }
.message-bubble:focus-visible { outline:2px solid var(--teal-light); outline-offset:3px; }
.message-bubble.actions-open,.message-bubble.message-pressing { -webkit-user-select:none; user-select:none; }
.message-bubble > .message-actions { position:fixed; z-index:12000; display:flex; flex-wrap:wrap; align-items:center; gap:3px; width:max-content; margin:0; padding:5px; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--ink); box-shadow:0 5px 22px #0d1f2826; visibility:hidden; opacity:0; pointer-events:none; overflow:auto; }
.message-bubble.actions-open > .message-actions { visibility:visible; opacity:1; pointer-events:auto; }
.message-bubble > .message-actions button { flex:none; min-height:32px; min-width:32px; padding:5px 8px; margin:0; white-space:nowrap; font-size:.75rem; line-height:1.3; }
.message-bubble > .message-actions button:hover,.message-bubble > .message-actions button:focus-visible { background:var(--teal-pale); color:var(--accent-dark); }
:root[data-theme="dark"] .message-bubble > .message-actions { background:#1b303b; color:#eaf2f4; border-color:#36515e; box-shadow:0 5px 22px #0006; }
@media(pointer:coarse) { .message-bubble > .message-actions { padding:6px; gap:4px; }.message-bubble > .message-actions button { min-width:44px; min-height:44px; } }
.thread-panel { width:var(--thread-width,clamp(310px,39%,470px)); display:flex; flex-direction:column; flex:none; min-height:0; min-width:0; border-left:1px solid var(--border); background:var(--bg); }
.thread-header { display:flex; align-items:center; justify-content:space-between; padding:12px 18px; border-bottom:1px solid var(--border); }
.thread-header h2 { margin:0; color:var(--ink); font:1.75rem/1.2 'Bebas Neue',sans-serif; }
.thread-scroll { overflow:auto; min-height:0; flex:1; padding:16px; }
.thread-message { padding:0 0 16px; }
.thread-message-meta { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:0 0 8px; font-size:.8125rem; color:var(--text); }
.thread-message-meta time { font-size:.625rem; color:var(--text-mid); }
#thread-messages .thread-message { padding-bottom:0; margin-top:16px; }
#thread-messages .thread-message:first-child { margin-top:0; }
#thread-messages .thread-message-continuation { margin-top:5px; }
.thread-message-continuation .thread-message-meta { display:none; }
.thread-avatar { width:25px; height:25px; font-size:.6875rem; }
#thread-root { border-bottom:1px solid var(--border); margin-bottom:20px; }
.thread-message .message-bubble { padding:10px 12px; max-width:100%; }
.thread-message .message-actions { flex-wrap:wrap; }
.thread-composer { padding:12px; border-top:1px solid var(--border); }
.thread-composer .rich-editor { border:1px solid var(--border); border-radius:5px; background:var(--bg); min-height:80px; max-height:150px; }
.thread-send-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:7px; }
.thread-send-actions .primary-button { min-height:32px; padding:6px 14px; }
.file-card { margin-top:10px; border:1px solid var(--border); border-radius:6px; overflow:hidden; max-width:420px; }
.file-card-info { display:flex; flex-direction:column; padding:9px 12px; }
.file-card-info strong { font-size:.8125rem; overflow-wrap:anywhere; }
.file-card-info small { font-size:.6875rem; color:var(--text-mid); }
.attachment-warning { margin:8px 0; padding:9px 12px; border:1px solid #bf903d; border-radius:6px; background:#fff4d9; color:#684a12; font-size:.8125rem; line-height:1.5; }
.file-card-info .file-expiry,.file-expiry { color:var(--text-mid); font-size:.75rem; }
.file-expired { opacity:.8; }
:root[data-theme="dark"] .attachment-warning { background:#3d321d; color:#ffe1a5; border-color:#9e7b39; }
.file-card-actions { display:flex; flex-wrap:wrap; gap:7px; padding:0 12px 10px; }
.file-card-actions a { text-decoration:none; }
.image-preview-button { padding:0; display:block; width:100%; background:transparent; border:0; }
.image-preview-button .message-image { margin:0; max-height:230px; max-width:100%; border-radius:0; }
.file-preview-image { max-width:100%; max-height:60dvh; object-fit:contain; display:block; margin:0 auto 14px; }
.file-pdf-preview { width:100%; height:60dvh; border:1px solid var(--border); margin-bottom:12px; }
.file-text-preview { max-height:60dvh; overflow:auto; background:#102a35; color:#e0f1f6; border-radius:6px; padding:14px; font:.75rem/1.7 'Space Mono',monospace; white-space:pre; }
#preview-content video,#preview-content audio { display:block; max-width:100%; width:100%; margin-bottom:18px; }
.modal:has(#preview-modal:not(.hidden)) { width:min(900px,100%); }
.selected-members { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; }
.member-chip { background:var(--teal-pale); color:var(--teal); border:1px solid var(--border); border-radius:20px; padding:5px 10px; font-size:.75rem; }
.search-filters { display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:9px 14px; margin:20px 0; }
.search-filters label { margin:0!important; }
.modal-section select { min-height:40px; width:100%; background:var(--bg); color:var(--ink); border:1px solid var(--border); border-radius:5px; padding:8px; }
.search-filters input { min-width:0; font-size:.8125rem; }
.search-filters small { font-size:.6875rem; color:var(--text-mid); }
#edit-message-editor { border:1px solid var(--border); border-radius:6px; min-height:160px; }
#code-value { white-space:pre; font:.8125rem/1.6 'Space Mono',monospace; }
.scheduled-card { border-bottom:1px solid var(--border); padding:16px 0; overflow-wrap:anywhere; }
.scheduled-card > p { white-space:pre-wrap; max-height:120px; overflow:auto; margin:8px 0; font-size:.875rem; }
.scheduled-card .scheduled-status { color:var(--text-mid); font-size:.75rem; }
.scheduled-actions { display:flex; gap:8px; }
#profile-onboarding { color:var(--ink); background:var(--bg); width:min(440px,calc(100vw - 32px)); border:1px solid var(--border); border-radius:12px; padding:28px; }
#profile-onboarding::backdrop { background:#041016b8; }
#profile-onboarding h2 { font:2.4rem/1.1 'Bebas Neue',sans-serif; margin:8px 0 16px; }
#profile-onboarding p { font-size:.875rem; }
#profile-onboarding label { display:block; font-size:.8125rem; font-weight:700; margin-bottom:6px; }
#onboarding-name { width:100%; border:1px solid var(--border); border-radius:5px; padding:10px; background:var(--bg); color:var(--ink); margin-bottom:12px; }
#onboarding-error { color:#b33c34; }
#profile-onboarding .primary-button { width:100%; }
.chat-page button:focus-visible,.chat-page a:focus-visible { outline:2px solid var(--teal-light); outline-offset:3px; }
@media(max-width:760px) { .pane-resizer,.thread-open:not(.narrow-thread) > .thread-resizer { display:none; }.sidebar-top { padding-top:12px; }.sidebar-intro { margin:2px 8px 12px; }.sidebar-actions { margin-bottom:12px; }.conversation-tabs { margin-top:10px; }.conversation-list { padding-top:8px; } }
@media(max-width:760px) { .workspace-grid.thread-open .channel-pane { display:none; }.workspace-grid.thread-open .thread-panel { width:100%; border-left:0; }.rich-toolbar button { min-height:34px; }.composer-area { padding:10px; }.search-filters { grid-template-columns:1fr; }.thread-composer { padding-bottom:max(12px,env(safe-area-inset-bottom)); }.member-row { flex-wrap:wrap; } }
@media(prefers-reduced-motion:reduce) { .chat-page * { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }
