/* Shared palette and component treatment for the workbench. */
:root {
  --wb-float-ease: cubic-bezier(.2,.72,.25,1);
}

html[data-yb-theme="dark"] {
  --wb-image: #a6cbf3;
  --wb-image-soft: #23374d;
  --wb-video: #edbd8b;
  --wb-video-soft: #423228;
}


body :where(input, textarea, [contenteditable="true"]) { caret-color: var(--wb-accent); }
::selection { background: var(--wb-accent-soft); color: var(--wb-ink); }

:where(#app, dialog) :is(button, a, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--wb-accent);
  outline-offset: 2px;
}

#app .button.primary:disabled {
  border-color: var(--wb-line);
  background: var(--wb-chrome);
  color: var(--wb-muted);
  opacity: 1;
}
#app .button.secondary {
  box-shadow: none;
}
#app details > summary:hover { background-color: var(--details-summary-hover, var(--wb-chrome)); }

body.reference-mode,
.reference-mode :is(.ref-application, .ref-chat-shell, .ref-rail, .ref-sidebar) {
  background: var(--wb-chrome);
}
html[data-yb-sidebar-tint="off"] .reference-mode :is(.ref-rail, .ref-sidebar) { background: var(--wb-subtle); }
html[data-yb-sidebar-tint="on"] .reference-mode :is(nav.ref-rail, aside.ref-sidebar) {
  background: var(--wb-chrome);
  border-color: var(--wb-line);
}

.reference-mode .ref-rail {
  border-inline-end: 1px solid var(--wb-line);
}
.reference-mode :is(.ref-rail-button, .ref-brand, .ref-account-avatar) {
  border-radius: var(--wb-control-radius);
}
.reference-mode .ref-rail-button { color: var(--wb-muted); }
.reference-mode .ref-rail-button svg { width: 21px; height: 21px; }
.reference-mode :is(.ref-rail-button, .ref-brand):hover { background: var(--wb-canvas); color: var(--wb-accent); }
.reference-mode .ref-rail-button.active { background: var(--wb-accent-soft); color: var(--wb-accent); }
.reference-mode .ref-rail-divider { background: var(--wb-line-strong); }
.reference-mode .ref-sidebar { border-inline-end: 1px solid var(--wb-line); scrollbar-color: var(--wb-line-strong) transparent; }
.reference-mode .ref-sidebar-top > .ref-search {
  border-color: var(--wb-line);
  color: var(--wb-muted);
}
.reference-mode .ref-search-input { color: var(--wb-ink); }
.reference-mode .ref-search-input::placeholder { color: var(--wb-muted); }
.reference-mode .ref-sidebar :is(.ref-assistant-entry, .ref-sidebar-action, .social-room, .ref-history-item) {
  border-radius: var(--wb-control-radius);
  color: var(--sidebar-action-color, var(--wb-ink));
}
.reference-mode .ref-sidebar .ref-assistant-entry { padding-inline: 8px; }
.reference-mode .ref-sidebar .ref-assistant-avatar { background: var(--wb-accent-soft); border-radius: var(--wb-control-radius); }
.reference-mode .ref-sidebar :is(.ref-assistant-copy small, .ref-list-label, .ref-history-copy small, .social-room-preview, time) { color: var(--wb-muted); }
.reference-mode .ref-sidebar :is(.ref-assistant-entry, .ref-sidebar-action, .social-room, .ref-history-item):hover { background: var(--sidebar-action-hover, var(--wb-canvas)); }
.reference-mode .ref-sidebar :is(.ref-assistant-entry, .ref-sidebar-action, .social-room, .ref-history-item).active { background: var(--wb-accent-soft); color: var(--sidebar-action-color, var(--wb-accent)); }
.reference-mode .ref-sidebar :is(.social-room-title strong, .ref-history-copy strong) { color: var(--wb-ink); }
.reference-mode .ref-sidebar .ref-sidebar-tabs {
  border-radius: var(--wb-control-radius);
}
.reference-mode .ref-sidebar .ref-sidebar-tabs::before { border-color: var(--wb-line); }
.reference-mode .ref-sidebar .ref-sidebar-tab.active {
  box-shadow: none;
  font-weight: 650;
}

.reference-mode :is(.ref-topbar, .social-chat-head) {
  min-height: 49px;
  color: var(--wb-ink);
}
.reference-mode :is(.ref-topbar, .ref-home-topbar, .social-chat-head) :is(.ref-page-title, .ref-header-title, .social-header-title, .view-title) {
  color: var(--wb-ink);
  font-size: .875rem;
  font-weight: 650;
}
.reference-mode :is(.ref-header-action, .ref-panel-toggle) { border-radius: var(--wb-control-radius); color: var(--wb-muted); }
.reference-mode :is(.ref-header-action, .ref-panel-toggle):hover { background: var(--wb-chrome); color: var(--wb-accent); }
.reference-mode .main-content { color: var(--wb-ink); scrollbar-color: var(--wb-line-strong) transparent; }
.reference-mode :is(.section-heading, .page-title) h1 { color: var(--wb-ink); letter-spacing: -.025em; }

.ref-home-workspace .ref-task-page .ref-task-empty { gap: 12px; overflow-y: auto; }
.ref-home-workspace .ref-task-page .ref-task-empty h1 { color: var(--wb-ink); font-size: 2rem; letter-spacing: -.035em; }

@media (min-width: 761px) {
  .ref-home-workspace .ref-task-page .ref-task-empty { container-type: inline-size; }
}

#app {
  --chat-column-width: 880px;
  --chat-bubble-fill: var(--wb-subtle);
  --chat-outgoing-fill: var(--wb-accent-soft);
  --chat-send-fill: var(--wb-accent);
  --chat-send-ink: var(--wb-accent-text);
}
.reference-mode .ref-home-workspace {
  --ref-home-context: var(--wb-subtle);
  --ref-home-surface: var(--wb-canvas);
  --ref-home-ink: var(--wb-ink);
  --ref-home-muted: var(--wb-muted);
  --ref-home-line: var(--wb-line-strong);
  --ref-home-accent: var(--wb-accent);
}
#app :is(.daily-chat, .social-chat, .chat-layout, .room-workspace) .workbench-chat-bubble {
  border-color: var(--wb-line);
  border-radius: var(--wb-panel-radius);
  color: var(--wb-ink);
}
#app :is(.daily-chat, .social-chat, .chat-layout, .room-workspace) .workbench-chat-outgoing { border-color: transparent; }
#app :is(.daily-chat, .social-chat, .chat-layout, .room-workspace) .workbench-chat-composer {
  border-color: var(--wb-line-strong);
  border-radius: var(--wb-panel-radius);
  background: var(--wb-canvas);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 85%),
    0 2px 6px rgb(18 49 43 / 4%),
    0 12px 30px -8px rgb(18 49 43 / 8%);
  transition: border-color 180ms ease, box-shadow 220ms ease;
}
#app :is(.daily-chat, .social-chat, .chat-layout, .room-workspace) .workbench-chat-composer:focus-within {
  border-color: var(--wb-accent);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 92%),
    0 0 0 3px var(--wb-accent-soft),
    0 14px 34px -8px rgb(20 100 90 / 16%);
}
#app :is(.daily-chat, .social-chat, .chat-layout, .room-workspace) .workbench-chat-send {
  min-width: 36px;
  width: 36px;
  min-height: 36px;
  height: 36px;
  border-radius: var(--wb-control-radius);
  transform: none;
}
#app :is(.daily-chat, .social-chat, .chat-layout, .room-workspace) .workbench-chat-send:hover:not(:disabled) {
  background: var(--wb-accent-hover);
}
#app .daily-aside .yb-companion-pane {
  --companion-ink: var(--wb-ink);
  --companion-accent: var(--wb-accent);
  --companion-muted: var(--wb-muted);
  --companion-line: var(--wb-line);
  --companion-hover: var(--wb-accent-soft);
  border-color: var(--wb-line);
  border-radius: var(--wb-panel-radius);
  background: var(--wb-subtle);
}
#app .yb-companion-tab.active { background: var(--wb-accent-soft); color: var(--wb-accent); }
#app :is(.ref-attachment-menu, .ref-project-popover, .ref-workspace-popover, .ref-account-popover, .ref-phone-more-popover) {
  border-radius: var(--wb-panel-radius);
  color: var(--wb-ink);
  background: var(--wb-canvas);
  box-shadow: var(--wb-overlay-shadow);
}

@media (max-width: 760px) {
  .reference-mode :is(.ref-application, .ref-chat-shell) > :is(.app-workspace, .social-main) { border-radius: 0; }
  .reference-mode .ref-rail .ref-rail-badge-wrap .ref-rail-button::after { content: "消息"; }
  .reference-mode .ref-rail { border-inline-end: 0; }
  .ref-home-workspace .ref-task-page .ref-task-empty { gap: 9px; padding-inline: 6px; }
  .ref-home-workspace .ref-task-page .ref-task-empty h1 { font-size: 1.625rem; }
  #app .ref-task-page .daily-composer-footer { grid-template-columns: minmax(0, 1fr) 36px; }
}

@media (max-height: 640px) {
  .ref-home-workspace .ref-task-page .ref-task-empty { gap: 8px; }
}
@media (max-width: 760px) and (max-height: 640px) {
  .ref-task-empty :is(.ref-shortcut-copy small, .ref-shortcut-arrow) { display: none; }
}

