/* Chat with one employee, laid out like ChatGPT and Claude: a centered column,
   the employee's answers as plain text, your messages in bubbles, and a
   rounded composer at the bottom. */
.employee-chat {
  --chat-width: 48rem;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
}
.employee-chat-stage { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }

/* Header */
.employee-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 20, .7);
  backdrop-filter: blur(14px);
}
.employee-chat-menu { display: none; }
.employee-chat-profile { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.employee-chat-profile > div { display: grid; min-width: 0; }
.employee-chat-profile h2 { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: 1rem; font-weight: 700; line-height: 1.4; }
.employee-chat-profile h2 bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-chat-profile p { overflow: hidden; color: var(--muted); font-size: .8rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.employee-chat-model { flex: none; padding: .05rem .5rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-2); font-size: .66rem; font-weight: 600; letter-spacing: .02em; }
.employee-chat-controls { display: flex; flex: none; align-items: center; gap: .3rem; }
.employee-chat-history {
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  height: 2.35rem;
  max-width: 16rem;
  padding: 0 .65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-2);
}
.employee-chat-history:hover { background: var(--hover); }
.employee-chat-history .icon { width: 1.05rem; height: 1.05rem; }
.employee-chat-task-picker {
  min-width: 0;
  max-width: 12rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: .84rem;
  text-overflow: ellipsis;
  cursor: pointer;
  appearance: none;
}
.employee-chat-task-picker:focus { outline: none; }
.employee-chat-history:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.employee-chat-task-picker option { background: var(--surface-2); color: var(--text); }

/* Conversation */
.employee-chat-conversation { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.employee-chat-conversation:focus { outline: none; }
.employee-chat-thread {
  width: min(100% - 2.5rem, var(--chat-width));
  margin: 0 auto;
  padding: 2rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
}
.employee-chat-user {
  align-self: flex-end;
  max-width: min(85%, 36rem);
  padding: .7rem 1.05rem;
  border-radius: 22px;
  background: var(--surface-2);
  color: var(--text);
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.employee-chat-user > * + * { margin-top: .5rem; }
.employee-chat-transcript { padding-top: .5rem; border-top: 1px solid var(--line-strong); color: var(--text-2); font-size: .88rem; }

.employee-chat-turn { display: flex; flex-direction: column; gap: .85rem; min-width: 0; }
.employee-chat-turn-identity { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; font-size: .9rem; }
.employee-chat-turn-identity .employee-chat-avatar { width: 1.75rem; height: 1.75rem; border-radius: 9px; }
.employee-chat-handoff { padding: .1rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .76rem; }

/* The employee's answer */
.employee-chat-prose { color: var(--text); font-size: 1rem; line-height: 1.95; overflow-wrap: anywhere; }
.employee-chat-prose > * + * { margin-top: .85rem; }
.employee-chat-prose h3 { margin-top: 1.5rem; font-size: 1.15rem; line-height: 1.6; }
.employee-chat-prose h4 { margin-top: 1.2rem; font-size: 1rem; line-height: 1.6; }
.employee-chat-prose > :first-child { margin-top: 0; }
.employee-chat-prose ul, .employee-chat-prose ol { margin-block: 0; padding-inline-start: 1.45rem; }
.employee-chat-prose li + li { margin-top: .35rem; }
.employee-chat-prose li::marker { color: var(--muted); }
.employee-chat-prose blockquote { margin-inline: 0; padding: .15rem 1rem; border-inline-start: 3px solid var(--violet); color: var(--text-2); }
.employee-chat-prose blockquote p + p { margin-top: .45rem; }
.employee-chat-prose hr { height: 0; margin-block: 1.6rem; border: 0; border-top: 1px solid var(--line-strong); }
.employee-chat-prose strong { font-weight: 700; color: #fff; }
.employee-chat-prose a { color: #a9c1ff; text-decoration: underline; text-decoration-color: rgba(169, 193, 255, .4); text-underline-offset: 3px; }
.employee-chat-prose a:hover { text-decoration-color: currentColor; }
.employee-chat-prose code, .employee-chat-user code {
  padding: .1em .4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em;
}
.employee-chat-code { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #07090e; }
.employee-chat-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .3rem .45rem .3rem .9rem;
  background: var(--surface);
  color: var(--muted);
  font-size: .74rem;
  direction: ltr;
}
.employee-chat-code-copy { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .55rem; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-size: .74rem; }
.employee-chat-code-copy:hover { background: var(--hover); color: var(--text); }
.employee-chat-code-copy .icon { width: .95rem; height: .95rem; }
.employee-chat-code pre { margin: 0; padding: .9rem 1rem; overflow-x: auto; font-size: .86rem; line-height: 1.7; tab-size: 2; }
.employee-chat-code pre code { padding: 0; border: 0; background: none; font-size: inherit; }

.employee-chat-table { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.employee-chat-table table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.7; }
.employee-chat-table th, .employee-chat-table td { padding: .6rem .85rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.employee-chat-table th { background: var(--surface); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.employee-chat-table tr:last-child td { border-bottom: 0; }
.employee-chat-table td + td, .employee-chat-table th + th { border-inline-start: 1px solid var(--line); }

.employee-chat-sources { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.employee-chat-sources > strong { margin-inline-end: .2rem; color: var(--muted); font-size: .78rem; font-weight: 600; }
.employee-chat-sources > div { display: contents; }
.employee-chat-sources a {
  display: inline-block;
  max-width: 16rem;
  padding: .22rem .7rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .78rem;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.employee-chat-sources a:hover { background: var(--surface-2); color: var(--text); }

.employee-chat-quality { padding: .7rem .95rem; border: 1px solid rgba(95, 211, 166, .24); border-radius: 14px; background: rgba(95, 211, 166, .06); font-size: .86rem; }
.employee-chat-quality[data-quality-state="needs_input"], .employee-chat-quality[data-quality-state="pending"] { border-color: rgba(242, 196, 107, .3); background: rgba(242, 196, 107, .06); }
.employee-chat-quality-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.employee-chat-quality-heading strong { color: var(--success); }
[data-quality-state="needs_input"] .employee-chat-quality-heading strong, [data-quality-state="pending"] .employee-chat-quality-heading strong { color: var(--warning); }
.employee-chat-quality-heading span { color: var(--muted); }
.employee-chat-quality p { margin-top: .35rem; color: var(--text-2); line-height: 1.75; }

.employee-chat-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem; margin-top: -.3rem; }
.employee-chat-message-actions .icon-button { width: 2rem; height: 2rem; border-radius: 8px; color: var(--muted); }
.employee-chat-message-actions .icon-button:hover { color: var(--text); }
.employee-chat-message-actions .icon-button .icon { width: 1.05rem; height: 1.05rem; }
.employee-chat-message-actions .pill { margin-inline-start: .35rem; }
.employee-chat-message-actions .icon-button.is-active { color: var(--accent); background: var(--hover); }
.employee-chat-rating { display: grid; gap: .5rem; max-width: 34rem; }
.employee-chat-rating[hidden] { display: none; }
.employee-chat-rating-note { margin: 0; padding: .45rem .7rem; border-inline-start: 2px solid var(--accent); border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: .85rem; cursor: pointer; white-space: pre-wrap; }
.employee-chat-rating-note[hidden] { display: none; }
.employee-chat-rating-form { display: grid; gap: .5rem; }
.employee-chat-rating-form textarea { width: 100%; resize: vertical; min-height: 3.6rem; padding: .6rem .75rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); font-size: .9rem; line-height: 1.6; }
.employee-chat-rating-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.employee-chat-rating-buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.employee-chat-rating-buttons button { min-height: 2.1rem; padding: .3rem .9rem; font-size: .85rem; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2rem;
  padding: .2rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: .8rem;
}
.pill:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.pill .icon { width: 1rem; height: 1rem; }

/* Live answer while it is written */
.employee-chat-thinking { display: inline-flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .92rem; }
.employee-chat-dots { display: inline-flex; gap: .28rem; }
.employee-chat-dots i { width: .42rem; height: .42rem; border-radius: 50%; background: var(--accent); animation: chat-dot 1.2s ease-in-out infinite; }
.employee-chat-dots i:nth-child(2) { animation-delay: .15s; }
.employee-chat-dots i:nth-child(3) { animation-delay: .3s; }
.employee-chat-turn[data-live] .employee-chat-prose > :is(p, h3, h4):last-child::after,
.employee-chat-turn[data-live] .employee-chat-prose > blockquote:last-child > p:last-child::after,
.employee-chat-turn[data-live] .employee-chat-prose > :is(ul, ol):last-child > li:last-child::after {
  content: '';
  display: inline-block;
  width: .5em;
  height: 1.05em;
  margin-inline-start: .2em;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: -.15em;
  animation: chat-caret 1s steps(2, start) infinite;
}
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes chat-caret { to { visibility: hidden; } }

.employee-chat-working { color: var(--muted); }
.employee-chat-retry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(255, 152, 162, .24);
  border-radius: 14px;
  background: rgba(255, 152, 162, .06);
}
.employee-chat-error { color: var(--danger); font-size: .9rem; line-height: 1.75; }

/* Designs, files and videos inside an answer */
.employee-chat-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .75rem; }
/* Wide formats get the whole row; tall ones sit side by side. */
.employee-chat-design:is([data-format="google-display"], [data-format="landing-hero"]) { grid-column: 1 / -1; }
.employee-chat-design-delivery { display: grid; gap: .6rem; }
.employee-chat-design, .employee-chat-artifact {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin: 0;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.employee-chat-design figcaption, .employee-chat-artifact figcaption { font-size: .92rem; font-weight: 600; }
.employee-chat-design-format { color: var(--muted); font-size: .78rem; }
.employee-chat-design-preview {
  display: grid;
  place-items: center;
  min-height: 10rem;
  overflow: hidden;
  border-radius: 12px;
  background: #07090e;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}
.employee-chat-design canvas { display: block; max-width: 100%; height: auto; max-height: 26rem; object-fit: contain; }
.employee-chat-design-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.employee-chat-design-status { color: var(--warning); font-size: .85rem; }
.employee-chat-production { display: grid; gap: .75rem; }
.employee-chat-artifact-preview { display: block; width: 100%; max-height: 28rem; border-radius: 12px; background: #07090e; object-fit: contain; }
.employee-chat-artifact-status { color: var(--muted); font-size: .85rem; line-height: 1.7; }
.employee-chat-artifact .secondary, .employee-chat-artifact-download { align-self: flex-start; }
.employee-chat-motion-job progress { width: 100%; accent-color: var(--violet); }

/* Alaa's plan for a real video: what will be shot, its price, and the shoot button */
.film-card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(115deg, rgba(103, 150, 253, .5), rgba(138, 139, 248, .35) 48%, rgba(220, 91, 208, .5)) border-box;
  border-color: transparent;
}
.film-head { display: flex; align-items: center; gap: .55rem; }
.film-head .icon { flex: none; width: 1.25rem; height: 1.25rem; color: var(--accent); }
.film-title { font-size: .98rem; font-weight: 700; line-height: 1.5; }
.film-facts { display: flex; flex-wrap: wrap; gap: .35rem; }
.film-chip { padding: .12rem .6rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-2); font-size: .76rem; line-height: 1.7; }
.film-prompt summary { cursor: pointer; color: var(--muted); font-size: .82rem; }
.film-prompt summary:hover { color: var(--text-2); }
.film-prompt p { margin-top: .45rem; padding: .65rem .8rem; border-radius: 10px; background: #07090e; color: var(--text-2); font-size: .8rem; line-height: 1.7; text-align: left; white-space: pre-wrap; }
.film-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.film-quality {
  min-height: 2.5rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: .85rem;
}
.film-quality option { background: var(--surface-2); color: var(--text); }
.film-shoot { display: inline-flex; align-items: center; gap: .45rem; }
.film-shoot .icon { width: 1.05rem; height: 1.05rem; }
.film-note, .film-status { color: var(--muted); font-size: .84rem; line-height: 1.75; }
.film-status { color: var(--text-2); }
.film-card progress { width: 100%; height: .45rem; accent-color: var(--violet); }
.film-card > .secondary { align-self: flex-start; }
.employee-chat-turn > .secondary { align-self: flex-start; }

/* First screen of a chat */
.employee-chat-empty { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: 1.5rem 0 .5rem; text-align: center; }
.employee-chat-empty h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; line-height: 1.45; }
.employee-chat-empty > p { max-width: 34rem; color: var(--muted); line-height: 1.85; }
.employee-chat-avatar-large { width: 3.7rem; height: 3.7rem; border-radius: 19px; margin-bottom: .3rem; }
.employee-chat-empty > .employee-chat-empty-role { margin-top: -.45rem; color: var(--text-2); font-size: .92rem; }
.employee-chat[data-empty="gate"] .employee-chat-conversation { flex: 0 1 auto; margin-block: auto; }
.employee-chat-starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; width: 100%; margin: .9rem 0 0; padding: 0; list-style: none; }
.employee-chat-starter, .employee-chat-starter-preview li {
  padding: .8rem .95rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.7;
  text-align: start;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.employee-chat-starter:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.employee-chat-signin { margin-top: .6rem; }

/* Composer */
.employee-chat-dock { position: relative; display: grid; gap: .45rem; width: min(100% - 2rem, var(--chat-width)); margin: 0 auto; padding: .35rem 0 .85rem; }
.employee-chat-jump {
  position: absolute;
  z-index: 2;
  inset-block-start: -3.1rem;
  inset-inline-start: 50%;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  transform: translateX(50%);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .9);
}
.employee-chat-jump .icon { width: 1.1rem; height: 1.1rem; }
.employee-chat-composer {
  display: grid;
  gap: .35rem;
  padding: .55rem .6rem .5rem;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 18px 50px -30px rgba(0, 0, 0, .95);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.employee-chat-composer:focus-within { border-color: rgba(169, 170, 255, .45); box-shadow: 0 0 0 4px rgba(138, 139, 248, .08), 0 18px 50px -30px rgba(0, 0, 0, .95); }
.employee-chat-prompt {
  width: 100%;
  min-height: 2.9rem;
  max-height: 15rem;
  padding: .5rem .65rem .2rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  resize: none;
}
.employee-chat-prompt:focus { outline: none; }
.employee-chat-prompt::placeholder { color: #6f768d; }
.employee-chat-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.employee-chat-settings { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; min-width: 0; }
.employee-chat-media-actions { display: flex; align-items: center; gap: .1rem; }
.employee-chat-tool { width: 2.3rem; height: 2.3rem; border-radius: 50%; }
.employee-chat-tool .icon { width: 1.2rem; height: 1.2rem; }
.employee-chat-record[aria-pressed="true"] { background: rgba(255, 152, 162, .12); color: var(--danger); }
.employee-chat-record-time { padding-inline: .2rem; color: var(--danger); font-size: .8rem; font-variant-numeric: tabular-nums; }
.employee-chat-research {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  height: 2.1rem;
  padding: 0 .75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: .8rem;
}
.employee-chat-research .icon { width: 1rem; height: 1rem; }
.employee-chat-research:hover:not(:disabled) { background: var(--hover); }
.employee-chat-research[aria-pressed="true"] { border-color: rgba(103, 150, 253, .45); background: rgba(103, 150, 253, .12); color: #c3d1ff; }
.employee-chat-mode {
  height: 2.1rem;
  max-width: 12.5rem;
  padding: 0 .75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .8rem;
}
.employee-chat-mode option { background: var(--surface-2); color: var(--text); }
.employee-chat-send {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(138, 139, 248, .95);
  transition: transform .15s ease, opacity .15s ease;
}
.employee-chat-send:hover:not(:disabled) { transform: translateY(-1px); }
.employee-chat-send:disabled { background: var(--surface-3); color: var(--muted); box-shadow: none; opacity: 1; }
.employee-chat-send .icon { width: 1.2rem; height: 1.2rem; stroke-width: 2.3; }
.employee-chat-send[aria-busy="true"] { background: var(--surface-3); }
.employee-chat-send[aria-busy="true"] .icon { animation: chat-spin 1s linear infinite; }
@keyframes chat-spin { to { transform: rotate(360deg); } }
.employee-chat-recipient {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .3rem .4rem .3rem .75rem;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .84rem;
}
.employee-chat-recipient .secondary { min-height: 1.9rem; padding: .2rem .7rem; font-size: .8rem; }
.employee-chat-media-list, .employee-chat-message-media { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.employee-chat-media-list { padding: .1rem .2rem 0; }
.employee-chat-media-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  max-width: 16rem;
  padding: .3rem .4rem .3rem .55rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: .8rem;
  white-space: normal;
}
.employee-chat-media-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-chat-media-preview { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 8px; object-fit: cover; }
audio.employee-chat-media-preview { width: 13rem; height: 2.2rem; }
video.employee-chat-media-preview { width: 8rem; height: auto; }
.employee-chat-media-remove { flex: none; width: 1.5rem; height: 1.5rem; padding: 0; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--text); line-height: 1; }
.employee-chat-media-feedback { padding: 0 .5rem; color: var(--warning); font-size: .8rem; line-height: 1.6; }
.employee-chat-provider { padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-size: .86rem; }
.employee-chat-provider summary { color: var(--text-2); cursor: pointer; }
.employee-chat-provider-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.employee-chat-provider select { min-height: 2.3rem; padding: 0 .7rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); }
.employee-chat-feedback { color: var(--success); font-size: .82rem; text-align: center; }
.employee-chat-disclaimer { color: #6f768d; font-size: .73rem; text-align: center; }

@media (min-width: 901px) {
  /* A new chat starts in the middle of the screen, like ChatGPT. */
  .employee-chat[data-empty="true"] .employee-chat-conversation { flex: 0 1 auto; margin-top: auto; }
  .employee-chat[data-empty="true"] .employee-chat-dock { margin-bottom: auto; padding-bottom: 3rem; }
}

@media (max-width: 900px) {
  .main[data-page="chat"] .mobile-bar { display: none; }
  .employee-chat-menu { display: inline-grid; margin-inline-start: -.3rem; }
  .employee-chat-header { gap: .4rem; padding: .45rem .6rem; padding-top: max(.45rem, env(safe-area-inset-top)); }
  .employee-chat-profile { flex: 1; gap: .55rem; }
  .employee-chat-profile .employee-chat-avatar { width: 1.9rem; height: 1.9rem; border-radius: 10px; }
  .employee-chat-profile h2 { font-size: .95rem; }
  .employee-chat-model { display: none; }
  .employee-chat-history { width: 2.35rem; padding: 0; justify-content: center; border-color: transparent; }
  .employee-chat-task-picker { position: absolute; inset: 0; max-width: none; opacity: 0; }
  .employee-chat-thread { width: calc(100% - 2rem); padding-top: 1.3rem; gap: 1.4rem; }
  .employee-chat-dock { width: calc(100% - 1.2rem); padding-bottom: max(.6rem, env(safe-area-inset-bottom)); }
  .employee-chat-starters { grid-template-columns: minmax(0, 1fr); }
  .employee-chat-user { max-width: 88%; }
  .employee-chat-disclaimer { display: none; }
  .employee-chat-prose { font-size: .98rem; }
}

@media (max-width: 420px) {
  .employee-chat-research span { display: none; }
  .employee-chat-research { width: 2.1rem; padding: 0; justify-content: center; }
  .employee-chat-mode { max-width: 8.5rem; }
}

/* Wahiba's tasks for the team, ready to send */
.handoffs { display: grid; gap: .7rem; padding: .85rem; border: 1px solid var(--line-strong); border-radius: 18px; background: linear-gradient(180deg, rgba(138, 139, 248, .07), rgba(20, 24, 35, .6)); }
.handoffs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.handoffs-heading { display: flex; align-items: center; gap: .45rem; }
.handoffs-heading .icon { color: var(--accent); }
.handoffs-count { padding: .05rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; }
.handoffs-all { min-height: 2.2rem; }
.handoffs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: .6rem; }
.handoff-card { display: flex; flex-direction: column; gap: .5rem; min-width: 0; padding: .75rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.handoff-card[data-state="working"] { border-color: rgba(138, 139, 248, .45); }
.handoff-card[data-state="done"] { border-color: rgba(95, 211, 166, .4); }
.handoff-card[data-state="failed"] { border-color: rgba(255, 152, 162, .4); }
.handoff-who { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.handoff-who .employee-chat-avatar { width: 2rem; height: 2rem; border-radius: 10px; }
.handoff-names { display: grid; min-width: 0; }
.handoff-names strong { font-size: .9rem; }
.handoff-names span { overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.handoff-title { font-size: .95rem; font-weight: 600; line-height: 1.6; }
.handoff-brief summary { cursor: pointer; color: var(--text-2); font-size: .8rem; }
.handoff-brief p { margin-top: .4rem; color: var(--text-2); font-size: .84rem; line-height: 1.8; white-space: pre-wrap; }
.handoff-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: auto; }
.handoff-actions .secondary { min-height: 2.1rem; padding: .35rem .8rem; font-size: .84rem; }
.handoff-status { color: var(--muted); font-size: .82rem; }
.handoff-card[data-state="working"] .handoff-status { color: var(--accent); }
.handoff-card[data-state="done"] .handoff-status { color: var(--success); }
.handoff-card[data-state="failed"] .handoff-status { color: var(--danger); }
.employee-chat-from { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: .45rem; padding: .15rem .6rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: .76rem; cursor: pointer; }
.employee-chat-from .icon { color: var(--accent); }

/* A page from the web developer, shown live */
.employee-chat-artifact-page { background: linear-gradient(180deg, rgba(103, 150, 253, .08), var(--surface)); }
.employee-chat-artifact-page .primary { align-self: flex-start; }
.employee-chat-artifact-note { color: var(--muted); font-size: .84rem; }
.page-preview { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #06070c; color: var(--text); }
.page-preview::backdrop { background: rgba(0, 0, 0, .7); }
.page-preview[open] { display: grid; grid-template-rows: auto 1fr; }
.page-preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .8rem; border-bottom: 1px solid var(--line); background: var(--bg-sidebar); }
.page-preview-title { flex: 1; min-width: 8rem; overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.page-preview-devices { display: inline-flex; gap: .2rem; padding: .2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.page-preview-device { display: inline-flex; align-items: center; gap: .35rem; min-height: 2rem; padding: .25rem .65rem; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; }
.page-preview-device[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.page-preview-action { width: 2.3rem; height: 2.3rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.page-preview-action:hover { background: var(--surface-3); }
.page-preview-stage { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 0, rgba(138, 139, 248, .12), transparent 60%), #06070c; }
.page-preview-frame { position: absolute; top: 12px; left: 50%; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); transform-origin: top center; }
.page-preview-stage[data-device="phone"] .page-preview-frame { border-radius: 26px; outline: 8px solid #1b1f2c; }
.page-preview-stage[data-device="tablet"] .page-preview-frame { border-radius: 18px; outline: 6px solid #1b1f2c; }
@media (max-width: 640px) {
  .page-preview-device span { display: none; }
  .page-preview-title { min-width: 0; }
}
.employee-chat-code-fold { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.employee-chat-code-fold > summary { padding: .55rem .8rem; color: var(--text-2); font-size: .85rem; cursor: pointer; }
.employee-chat-code-fold[open] > summary { border-bottom: 1px solid var(--line); }
.employee-chat-code-fold > :not(summary) { margin: 0; border: 0; border-radius: 0 0 12px 12px; }
