/* OCA Team Dashboard v2: Canvas CSS
   Covers: ChatHeader, EmptyState, Transcript, Composer
*/

/* ── Shared icon button (referenced by both layout + canvas) ─────────────── */

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s, color .12s;
}

.icon-btn:hover {
  background: var(--hover-strong);
  color: var(--ink-1);
}

/* ── ChatHeader ──────────────────────────────────────────────────────────── */

.chat-header {
  height: 54px;
  padding: 0 16px 0 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  flex-shrink: 0;
}

.chat-header__thread-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 1;
}

.chat-header__thread-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-header__thread-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-header__persona-name {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-1);
}

.chat-header__persona-role {
  font-family: 'Francois One', sans-serif;
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.chat-header__thread-title {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-header__spacer {
  flex: 1;
}

.chat-header__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.chat-header__team-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header__team-label {
  font-family: 'Francois One', sans-serif;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--ink-3);
  text-transform: uppercase;
  white-space: nowrap;
}

.chat-header__team-avatars {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header__persona-btn {
  border: none;
  background: transparent;
  padding: 3px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}

.chat-header__persona-btn:hover {
  background: var(--hover);
}

.chat-header__locked-pill {
  width: 28px;
  height: 28px;
  margin-left: 2px;
  border-radius: 999px;
  border: 1.5px dashed var(--teal);
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Francois One', sans-serif;
  font-size: 11px;
  cursor: default;
}

.chat-header__sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

.chat-header__thread-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Bell attention button (position:relative so badge anchors to it) */
.chat-header__bell-btn {
  position: relative;
}

.chat-header__attention-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--surface-2);
}


/* ── EmptyState ──────────────────────────────────────────────────────────── */

.empty-state {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 8px;
}

.empty-state__inner {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.empty-state__headline {
  font-family: 'Francois One', sans-serif;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: .005em;
  color: var(--ink-1);
  text-align: center;
}

.empty-state__subhead {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  text-align: center;
  max-width: 460px;
}

.empty-state__nudge {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--separator);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-1);
  transition: background .12s, border-color .12s;
  font-family: 'Manrope', sans-serif;
}

.empty-state__nudge:hover {
  background: var(--surface-0);
  border-color: var(--separator-strong);
}

.empty-state__nudge-count {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.empty-state__nudge-text {
  font-size: 12.5px;
  line-height: 1.4;
}

.empty-state__nudge-secondary {
  color: var(--ink-2);
}

.empty-state__nudge-bold {
  color: var(--ink-1);
  font-weight: 600;
}

.empty-state__nudge-cta {
  color: var(--red);
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}


/* ── Transcript ──────────────────────────────────────────────────────────── */

.transcript {
  flex: 1;
  overflow: auto;
  padding: 24px 0;
}

.transcript__inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Persona message */
.msg-persona {
  display: flex;
  gap: 14px;
}

.msg-persona__avatar-wrap {
  padding-top: 2px;
  flex-shrink: 0;
}

.msg-persona__content {
  flex: 1;
  min-width: 0;
  padding-left: 14px;
  margin-left: -2px;
  /* border-left set inline using persona color */
  border-left-width: 2px;
  border-left-style: solid;
}

.msg-persona__header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.msg-persona__name {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-1);
}

.msg-persona__role {
  font-family: 'Francois One', sans-serif;
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.msg-persona__time {
  font-size: 11px;
  color: var(--ink-3);
}

.msg-persona__body {
  font-family: 'Manrope', sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-1);
  margin-top: 6px;
  text-wrap: pretty;
}

/* Artifact card */
.msg-artifact {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.msg-artifact__doc {
  width: 32px;
  height: 38px;
  border-radius: 5px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}

.msg-artifact__doc-line {
  position: absolute;
  left: 5px;
  right: 5px;
  height: 1.5px;
  background: var(--ink-3);
}

.msg-artifact__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
}

.msg-artifact__meta {
  font-size: 11px;
  color: var(--ink-3);
}

.msg-artifact__sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

.msg-artifact__open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink-1);
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  height: 28px;
  font-size: 12px;
  transition: background .12s;
}

.msg-artifact__open-btn:hover {
  background: var(--hover);
}

/* "You" message */
.msg-you {
  display: flex;
  justify-content: flex-end;
}

.msg-you__inner {
  max-width: 78%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.msg-you__time {
  font-size: 11px;
  color: var(--ink-3);
}

.msg-you__bubble {
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 14px 14px 4px 14px;
  font-family: 'Manrope', sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-1);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12px;
  padding: 4px 0;
}

.typing-indicator__dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--ink-3);
  display: inline-block;
  animation: pulse 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 120ms; }
.typing-dot:nth-child(3) { animation-delay: 240ms; }

.typing-indicator__label {
  font-style: italic;
}


/* ── Composer ────────────────────────────────────────────────────────────── */

.composer-wrap {
  padding: 12px 28px 4px;
  flex-shrink: 0;
}

.composer-wrap__inner {
  max-width: 840px;
  margin: 0 auto;
}

.composer-card {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--surface-0);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 12px 14px 12px 16px;
  box-shadow: var(--shadow-card);
}

.composer__persona-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--hover-strong);
  flex-shrink: 0;
  margin-bottom: 2px;
}

.composer__persona-chip-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-1);
}

.composer__attach-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .12s;
}

.composer__attach-btn:hover {
  color: var(--ink-1);
}

.composer__textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  font-family: 'Manrope', sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-1);
  padding: 5px 0;
  max-height: 160px;
  overflow-y: auto;
}

.composer__textarea::placeholder {
  color: var(--ink-3);
}

.composer__send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background-color: var(--coral);
  background-image: linear-gradient(
    180deg,
    rgba(255,255,255,.22) 0%,
    rgba(255,255,255,0) 55%,
    rgba(0,0,0,.06) 100%
  );
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-end;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.32),
    0 1px 2px rgba(15,19,24,.10),
    0 2px 6px rgba(239,123,69,.22);
  transition: transform .08s;
}

.composer__send-btn:active,
.composer__send-btn.is-pressed {
  transform: translateY(1px);
}

.composer__hints {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.composer__hints.is-hidden {
  display: none;
}

.composer__hint-item {
  white-space: nowrap;
}

.composer__kbd {
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--hover-strong);
  color: var(--ink-2);
  border: 1px solid var(--border);
}

.composer__at-mention {
  color: var(--ink-1);
  font-weight: 600;
}
