/* v122: approved transparent identity and a brighter, calmer chat workspace. */
.timesai-brand-name {
  display:inline-block!important;width:102px!important;height:24px!important;
  flex:0 0 auto;overflow:hidden;font-size:0!important;line-height:0!important;
  color:transparent!important;text-shadow:none!important;
  background:transparent url('timesai-logo-wordmark-v122.webp') center/contain no-repeat!important;
}
#site-header .brand .timesai-brand-name {width:112px!important;height:26px!important}
.chat-reference-layout .compact-sidebar-brand .timesai-brand-name {width:95px!important;height:23px!important}
#site-header .brand .timesai-brand-name,
.chat-reference-layout .compact-sidebar-brand .timesai-brand-name,
.chat-reference-layout .chat-desktop-brand .timesai-brand-name {font-size:0!important;line-height:0!important}
.timesai-brand-mark,.brand-lockup,.contact-logo,.account-logo,
.timesai-hourglass-loader img,.chat-welcome-mark,.chat-welcome-mark img {
  background:transparent!important;border:0!important;box-shadow:none!important;
}
.brand-lockup {object-fit:contain}
body.chat-route {
  --chat-ink:#172338;--chat-muted:#52627a;--chat-blue:#1764ef;
  background:#fff!important;color:var(--chat-ink);
}
body.chat-route .chat-reference-layout .chat-workspace,
body.chat-route .chat-reference-layout #messages {background:#fff!important}
body.chat-route .chat-reference-layout .chat-history {
  background:#f4f8ff!important;border-right:1px solid #dae5f5;
  padding-inline:16px!important;
}
.chat-reference-layout .chat-new-button {
  min-height:44px!important;height:44px!important;margin-bottom:12px!important;
  color:#fff!important;font-weight:650!important;border-radius:12px!important;
  background:linear-gradient(165deg,#4689ff 0%,#1764ef 48%,#1254cf 100%)!important;
  box-shadow:inset 0 1px 0 #ffffff70,0 5px 14px #1764ef24!important;
}
.chat-reference-layout .chat-primary-nav {gap:4px;padding-bottom:12px;margin-bottom:12px}
.chat-reference-layout .chat-primary-nav>button,
.chat-reference-layout .chat-primary-nav>.rtc-contacts-link,
.chat-reference-layout #chat-project-toggle {
  min-height:40px;height:40px;gap:12px;font-size:14px;color:#263a56!important;
}
.chat-reference-layout .chat-primary-nav .ui-icon {color:#3e6295}
.chat-reference-layout .chat-primary-nav>button.selected,
.chat-reference-layout .chat-primary-nav>button:hover,
.chat-reference-layout .chat-primary-nav>.rtc-contacts-link:hover {
  background:#e3edff!important;color:#1556cb!important;
}
.chat-reference-layout .history-row {min-height:40px!important;height:40px;margin-bottom:5px!important}
.chat-reference-layout .history-row.selected {background:#e0ebff!important}
.chat-reference-layout .history-item b {color:#263a56!important;font-size:13px!important}
.chat-reference-layout .history-item>.ui-icon {color:#4f6e9b}
.chat-reference-layout .history-item small,
.chat-reference-layout .chat-history-heading,
.chat-reference-layout .chat-history-heading>span,
.chat-reference-layout .chat-account-card small {color:#52627a!important}
.chat-reference-layout .history-more-button {color:#526784!important}
.chat-reference-layout .chat-history-empty,
.chat-reference-layout #chat-history-no-results {color:#52627a!important}
.chat-reference-layout .chat-account-card {
  background:#ffffffa6!important;border:1px solid #dce6f4!important;
  min-height:56px!important;height:auto;border-radius:12px;padding:9px!important;
}
body.chat-route .chat-reference-layout .chat-workspace-header {
  min-height:64px!important;height:64px!important;padding:10px 24px!important;
  border-bottom:1px solid #edf1f8;background:#fff!important;
}
.chat-reference-layout .chat-header-title h2 {color:#172338;font-size:15px!important;font-weight:650}
.chat-reference-layout .chat-icon-button {color:#52627a!important}
.chat-reference-layout .chat-icon-button:hover {background:#edf4ff!important;color:#175cd3!important}
.chat-reference-layout .chat-upgrade {
  background:linear-gradient(170deg,#fff,#eaf2ff);color:#1556cb;border-color:#c9dbfa;
  box-shadow:inset 0 1px 0 #fff;min-height:36px;border-radius:10px;
}
body.chat-route .chat-reference-layout #messages {
  padding:32px max(28px,calc((100% - 800px)/2)) 28px!important;
}
.chat-reference-layout .message {max-width:800px!important;margin-bottom:32px!important}
.chat-reference-layout .message-body {
  color:#172338!important;font-size:16px!important;line-height:1.95!important;
}
.chat-reference-layout .message-body>p {margin-bottom:16px!important}
.chat-reference-layout .user .message-body {
  background:#eaf2ff!important;color:#1c3557!important;
  padding:13px 19px!important;border:1px solid #d9e7ff!important;border-radius:19px!important;
}
.chat-reference-layout .chat-message-time {color:#52627a}
.chat-reference-layout .message-actions {opacity:1;gap:6px}
.chat-reference-layout .message-actions button {color:#52627a!important;min-height:34px!important;height:34px!important}
.chat-reference-layout .message-actions button:hover {background:#edf4ff;color:#175cd3}
body.chat-route .chat-reference-layout .chat-composer-area {
  padding:12px max(24px,calc((100% - 800px)/2)) max(14px,env(safe-area-inset-bottom))!important;
  background:linear-gradient(180deg,#ffffff00,#fff 18%);
}
body.chat-route .chat-reference-layout form.chat-composer {
  background:#fff!important;border:1px solid #b7cbed!important;border-radius:24px!important;
  padding:12px 14px!important;min-height:110px;
  box-shadow:0 5px 24px #2448780c,inset 0 1px 0 #fff!important;
  transition:border-color .18s ease,box-shadow .18s ease;
}
body.chat-route .chat-reference-layout form.chat-composer:focus-within {
  border-color:#4f8cf5!important;box-shadow:0 0 0 3px #1764ef12,0 7px 24px #2448780c!important;
}
.chat-reference-layout .chat-compose-row {
  grid-template-columns:44px minmax(0,1fr) 44px 44px!important;
  grid-template-rows:auto 44px!important;gap:6px 10px!important;
}
body.chat-route .chat-reference-layout .chat-composer textarea {
  color:#172338!important;font-size:16px!important;padding:6px 3px 10px!important;
  line-height:1.8;min-height:48px!important;
}
.chat-reference-layout .chat-composer textarea::placeholder {color:#596b84;opacity:1}
.chat-reference-layout .chat-plus-button,
.chat-reference-layout .chat-dictation-button,
.chat-reference-layout .chat-send-button {
  width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
}
.chat-reference-layout .chat-plus-button,.chat-reference-layout .chat-dictation-button {
  color:#3c5678!important;background:#f3f7ff!important;
}
.chat-reference-layout .chat-dictation-button.is-listening {background:#ffe9ed!important;color:#b42342!important}
.chat-reference-layout .chat-send-button {
  background:linear-gradient(165deg,#478cff,#1764ef 48%,#1254cf)!important;
  box-shadow:inset 0 1px 0 #ffffff75,0 4px 12px #1764ef25!important;
}
.chat-reference-layout .chat-send-button:disabled {opacity:.5;box-shadow:none!important}
.chat-reference-layout .chat-tools-trigger {height:40px;min-height:40px;color:#385579;font-size:13px;gap:7px}
.chat-reference-layout .chat-tools-trigger:hover {background:#edf4ff;color:#175cd3;border-radius:10px}
.chat-reference-layout .chat-welcome {max-width:700px;padding:24px 10px}
.chat-reference-layout .chat-welcome h1 {font-size:28px;color:#172338;margin-bottom:10px}
.chat-reference-layout .chat-welcome>p {color:#52627a;font-size:14px;line-height:1.9}
.chat-reference-layout .chat-welcome-mark {width:60px;height:60px;margin-bottom:16px}
.chat-reference-layout .chat-welcome-mark img {width:52px;height:52px}
.chat-reference-layout .chat-prompt-grid {gap:12px;margin-top:26px}
.chat-reference-layout .chat-prompt {background:#fff;border-color:#dbe6f6;padding:16px;border-radius:14px}
.chat-reference-layout .chat-prompt:hover {background:#f5f9ff;border-color:#9cbbf0;box-shadow:0 5px 16px #1764ef0b}
.chat-reference-layout .chat-prompt b {color:#223a5b;font-size:13px}
.chat-reference-layout .chat-prompt small {color:#52627a;font-size:12px;line-height:1.7}
.chat-reference-layout .chat-prompt>.ui-icon:first-child {color:#1764ef;width:20px;height:20px;margin-bottom:9px}
.chat-reference-layout .timesai-ai-disclaimer,.chat-reference-layout .chat-information {color:#596b84}
.chat-reference-layout button:focus-visible,.chat-reference-layout a:focus-visible {outline:3px solid #4b8af4;outline-offset:3px}
@media(max-width:900px) {
  body.chat-route .chat-reference-layout .chat-history {padding-inline:14px!important}
  body.chat-route .chat-reference-layout .chat-workspace-header {min-height:58px!important;height:58px!important;padding:8px 12px!important}
  body.chat-route .chat-reference-layout #messages {padding:24px 18px 18px!important}
  .chat-reference-layout .message {margin-bottom:28px!important}
  .chat-reference-layout .message-body {font-size:15.5px!important;line-height:1.95!important}
  .chat-reference-layout .user .message-body {padding:11px 15px!important}
  body.chat-route .chat-reference-layout .chat-composer-area {padding:8px 12px max(10px,env(safe-area-inset-bottom))!important}
  body.chat-route .chat-reference-layout form.chat-composer {padding:10px!important;border-radius:22px!important;min-height:106px}
  .chat-reference-layout .chat-compose-row {gap:5px 6px!important}
  .chat-reference-layout .chat-welcome h1 {font-size:24px}
  .chat-reference-layout .chat-prompt-grid {gap:10px;margin-top:20px}
  .chat-reference-layout .chat-prompt {padding:13px}
  .chat-reference-layout .chat-latest {bottom:155px}
  .chat-reference-layout .chat-header-actions .chat-icon-button {min-width:40px!important;min-height:40px!important}
}
@media(max-width:360px) {
  body.chat-route .chat-reference-layout #messages {padding-inline:14px!important}
  body.chat-route .chat-reference-layout .chat-composer-area {padding-inline:8px!important}
  .chat-reference-layout .chat-compose-row {gap:4px!important}
  .chat-reference-layout .chat-tools-trigger {font-size:12px;padding-inline:3px!important;gap:3px}
}
@media(max-height:520px) {
  body.chat-route .chat-reference-layout .chat-workspace-header {min-height:48px!important;height:48px!important}
  body.chat-route .chat-reference-layout form.chat-composer {min-height:92px;padding-block:7px!important}
  .chat-reference-layout .chat-composer textarea {max-height:65px!important;min-height:32px!important}
}
@media(prefers-reduced-motion:reduce) {
  body.chat-route .chat-reference-layout form.chat-composer {transition:none}
}

/* v122: pearl-white surface, brighter glass highlight, direct transparent WebP identity. */
body.chat-route .chat-reference-layout .chat-workspace,
body.chat-route .chat-reference-layout #messages {
  background-color:#fff!important;
  background-image:linear-gradient(120deg,rgba(255,255,255,0) 55%,rgba(223,238,255,.18) 100%)!important;
}
body.chat-route .chat-reference-layout .chat-workspace-header {
  box-shadow:inset 0 1px 0 #fff,0 1px 12px #2972d807;
}
body.chat-route .chat-reference-layout form.chat-composer {
  background:linear-gradient(165deg,#fff 0%,#fff 76%,#f8fbff 100%)!important;
  box-shadow:inset 0 1px 0 #fff,0 6px 25px #24487812!important;
}
.chat-reference-layout .chat-upgrade {
  background:linear-gradient(180deg,#fff 0%,#f3f8ff 45%,#e0edff 49%,#edf5ff 100%)!important;
  border:1px solid #bed4fb!important;color:#1354c5!important;
  box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 #c9defb,0 3px 10px #1764ef12!important;
}
.chat-reference-layout .compact-sidebar-brand .timesai-brand-mark,
.timesai-hourglass-loader img {filter:none!important;object-fit:contain;background:transparent!important}

/* Output workbench lives in an accessible modal, independent of the selected chat. */
dialog.output-workspace-dialog-v122 {
  width:min(1220px,calc(100vw - 32px))!important;max-width:none!important;
  max-height:calc(100dvh - 32px)!important;padding:30px 24px 20px!important;
  border:1px solid #d9e5f6;border-radius:22px;background:#fff;overflow:auto;
}
.output-workspace-dialog-v122 #modal-content {min-width:0}
.output-workspace-head {padding-inline-end:32px;margin-bottom:18px}
.output-workspace-head h2 {margin:3px 0;font-size:22px;overflow-wrap:anywhere;color:#172338}
.output-workspace-head p {margin:5px 0;color:#52627a;font-size:12px}
.output-workspace-layout {display:grid;grid-template-columns:210px minmax(0,1fr);gap:20px;min-width:0}
.output-workspace-list {padding:14px;background:#f4f8ff;border:1px solid #dce7f7;border-radius:14px;min-width:0}
.output-workspace-list>b {display:block;font-size:13px;color:#263a56;margin-bottom:12px}
#outputs-items {display:grid;gap:7px;max-height:50dvh;overflow:auto}
#outputs-items>button {display:flex;align-items:center;gap:8px;width:100%;min-height:44px;text-align:right;padding:9px;border:1px solid transparent;border-radius:10px;background:transparent;color:#3a5274;font:inherit;font-size:12px;overflow-wrap:anywhere}
#outputs-items>button>.ui-icon {flex:none;width:17px;height:17px}
#outputs-items>button[aria-pressed=true] {background:#fff;border-color:#c6dafb;color:#1556cb;box-shadow:0 3px 10px #1764ef09}
.output-workspace-exports {display:grid;gap:6px;margin-top:16px;padding-top:12px;border-top:1px solid #dce7f7}
.output-workspace-exports button {font:inherit;font-size:11px;min-height:36px;border:0;background:transparent;text-align:right;color:#3e5e8b}
.output-workspace-main {min-width:0}
.output-workspace-toolbar {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.output-workspace-toolbar strong {font-size:13px;color:#263a56;overflow-wrap:anywhere}
.output-workspace-toolbar>div {display:flex;gap:7px;flex-wrap:wrap}
.output-workspace-toolbar button {font:inherit;font-size:11px;min-height:40px;padding:8px 12px;border:1px solid #cddcf3;border-radius:10px;color:#24558e;background:#f7faff}
.output-workspace-toolbar #outputs-save-version {color:#fff;border-color:#1764ef;background:linear-gradient(165deg,#4b8fff,#1764ef 50%,#1254cf);box-shadow:inset 0 1px 0 #ffffff70}
.output-workspace-panes {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;min-width:0}
.output-workspace-panes>div {min-width:0}
.output-editor-pane>label,.output-preview-pane>b {display:block;color:#52627a;font-size:12px;font-weight:600;margin:0 0 8px}
#outputs-editor {width:100%;height:49dvh;min-height:250px;resize:vertical;margin:0;padding:16px;border:1px solid #c6d8f4;border-radius:12px;color:#172338;background:#fcfdff;font:14px/1.95 Vazir,Tahoma,sans-serif;overflow:auto;direction:rtl;text-align:start}
#outputs-editor:focus {outline:2px solid #99bcfa;outline-offset:1px}
.output-workspace-preview {height:49dvh;min-height:250px;overflow:auto;padding:16px;border:1px solid #dfe8f6;border-radius:12px;background:#fff;color:#172338;font-size:14px;line-height:1.95;overflow-wrap:anywhere;text-align:right;direction:rtl}
.output-workspace-preview p {margin:0 0 14px}
.output-workspace-preview h1,.output-workspace-preview h2,.output-workspace-preview h3 {font-size:18px;margin:8px 0 14px}
.output-workspace-preview pre {overflow:auto;max-width:100%;direction:ltr;text-align:left;background:#f3f7ff;padding:12px;border-radius:9px;white-space:pre-wrap;overflow-wrap:anywhere}
.output-workspace-preview table {display:block;max-width:100%;overflow:auto;border-collapse:collapse}
.output-workspace-preview th,.output-workspace-preview td {border:1px solid #dce6f5;padding:7px 10px}
.output-workspace-preview img {display:block;max-width:100%;max-height:100%;height:auto;object-fit:contain;margin:auto}
.output-workspace-preview a {color:#175cd3;text-decoration:underline}
#outputs-save-status {margin:10px 0 0;color:#52627a;font-size:11px;min-height:22px}
.output-workspace-tabs,.outputs-mobile-select {display:none}
.output-asset-view {grid-template-columns:1fr}
.output-asset-view .output-editor-pane {display:none!important}
.output-workspace-dialog-v122 button:focus-visible {outline:3px solid #72a5fb;outline-offset:2px}
@media(max-width:900px) {
 dialog.output-workspace-dialog-v122 {width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;padding:28px 14px 14px!important;border-radius:17px}
 .output-workspace-head {margin-bottom:12px}.output-workspace-head h2 {font-size:18px}
 .output-workspace-layout {display:block}
 .output-workspace-list {display:none}
 .outputs-mobile-select {display:block;font-size:12px;color:#52627a;margin-bottom:12px}
 .outputs-mobile-select select {width:100%;min-height:44px;margin-top:4px;padding:8px;border-color:#c6d8f4;border-radius:10px;background:#f7faff;font-size:13px}
 .output-workspace-toolbar {gap:8px}.output-workspace-toolbar>div {width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .output-workspace-toolbar button {padding:8px 5px;font-size:10.5px;min-height:44px}
 .output-workspace-tabs {display:flex;gap:6px;margin-bottom:12px;background:#f2f7ff;border-radius:10px;padding:4px}
 .output-workspace-tabs button {flex:1;min-height:38px;padding:6px;border:0;border-radius:8px;background:transparent;color:#52627a;font:inherit;font-size:13px}
 .output-workspace-tabs button[aria-selected=true] {color:#1556cb;background:#fff;box-shadow:0 2px 7px #1764ef10}
 .output-workspace-panes {display:block}
 .output-workspace-panes[data-view=edit]:not(.output-asset-view) .output-preview-pane {display:none}
 .output-workspace-panes[data-view=preview] .output-editor-pane {display:none}
 #outputs-editor,.output-workspace-preview {height:42dvh;min-height:180px}
}
