@import url(https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Montserrat:wght@400&display=swap);
/* Geist font — loaded globally so it's available inside Shadow DOM */


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── SHARED ANIMATION STYLES ────────────────────────────────────────────────
   All .onb-* classes used by both ONB and BP animations.
   Token defaults (:host variables) live in each animation's own CSS file.
   ─────────────────────────────────────────────────────────────────────────── */

.onb-component {
  width: 100%;
  height: var(--panel-height);
  display: flex;
  flex-direction: column;
  font-family: 'Geist', sans-serif;
}
.onb-win {
  width: 100%; height: 100%;
  background: var(--base-win-bg);
  border: 1px solid var(--base-win-border);
  border-radius: var(--base-win-radius);
  box-shadow: var(--base-win-shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
}

/* Bar */
.onb-bar {
  background: var(--base-bar-bg);
  border-bottom: 1px solid var(--base-bar-border);
  padding: var(--base-bar-padding);
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 10px; flex-shrink: 0;
}
.onb-bar-left {
  display: flex; align-items: flex-start;
  gap: 10px; flex: 1; min-width: 0;
}
.onb-bar-title {
  font-size: var(--base-bar-title-size);
  font-weight: var(--base-bar-title-weight);
  font-style: var(--base-bar-title-style);
  color: var(--base-bar-title-color);
  word-break: break-word; text-wrap: balance;
}
.onb-bar-sub {
  font-size: var(--base-bar-sub-size);
  font-weight: var(--base-bar-sub-weight);
  font-style: var(--base-bar-sub-style);
  color: var(--base-bar-sub-color);
  word-break: break-word; text-wrap: balance;
}

/* Thread */
.onb-thread {
  flex: 1; overflow-y: auto;
  padding: var(--base-thread-padding);
  display: flex; flex-direction: column;
  gap: var(--base-thread-gap);
  scroll-behavior: smooth;
}
.onb-thread::-webkit-scrollbar { width: 0; }

/* Incoming indicator */
.onb-incoming {
  display: flex; align-items: center;
  gap: 8px; padding: 6px 2px;
  flex-shrink: 0; opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.onb-incoming.visible { opacity: 1; }
.onb-incoming-av {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geist', sans-serif;
  font-size: 8px; font-weight: 700;
  flex-shrink: 0; letter-spacing: 0;
}
.onb-incoming-av--human { background: var(--base-human-av-bg); color: #ffffff; }
.onb-incoming-av--agent { background: var(--onb-agent-av-bg); color: var(--onb-agent-av-text); }
.onb-typing-bubble {
  display: flex; align-items: center; gap: 4px;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  padding: 7px 11px; border-radius: 12px;
}
.onb-typing-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #94a3b8;
  animation: typingBounce 1.4s ease-in-out infinite;
}
.onb-typing-dot:nth-child(1) { animation-delay: 0s; }
.onb-typing-dot:nth-child(2) { animation-delay: 0.18s; }
.onb-typing-dot:nth-child(3) { animation-delay: 0.36s; }
.onb-incoming-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  color: #64748b; flex-shrink: 0;
}
.onb-typing-email { display: flex; align-items: center; gap: 6px; }
.onb-typing-email-name { font-size: 12px; font-weight: 500; color: #64748b; }
.onb-typing-email-dots { display: inline-flex; align-items: center; gap: 3px; }
.onb-typing-email-dots span {
  width: 3px; height: 3px; border-radius: 50%; background: #94a3b8;
  animation: typingBounce 1.4s ease-in-out infinite;
}
.onb-typing-email-dots span:nth-child(1) { animation-delay: 0s; }
.onb-typing-email-dots span:nth-child(2) { animation-delay: 0.18s; }
.onb-typing-email-dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30%            { transform: translateY(-4px); opacity: 1; }
}

/* Card outer */
.onb-card-outer {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  flex-shrink: 0;
}
.onb-card-outer.expanded { grid-template-rows: 1fr; }
.onb-card-inner { overflow: hidden; min-height: 0; }

/* Card */
.onb-card {
  background: var(--base-card-bg);
  border: 1px solid var(--base-card-border);
  border-radius: var(--base-card-radius);
  overflow: hidden; opacity: 0;
  transform: scale(0.97) translateY(6px);
  transition: opacity 0.6s cubic-bezier(0.65, 0, 0.35, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: 'Geist', sans-serif;
  font-size: var(--base-body-size);
}
.onb-card.entered  { opacity: 1; transform: scale(1) translateY(0); }
.onb-card.collapsed { transform: scale(1) translateY(0); }
.onb-card-body-wrap {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.onb-card.collapsed .onb-card-body-wrap { grid-template-rows: 0fr; }
.onb-card-body-inner { overflow: hidden; min-height: 0; }

/* Card head */
.onb-card-head {
  padding: var(--base-card-head-padding);
  border-bottom: 1px solid var(--base-card-head-border);
  display: flex; align-items: center; gap: 10px;
}
.onb-av {
  width: var(--base-av-size); height: var(--base-av-size);
  border-radius: var(--base-av-radius); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geist', sans-serif;
  font-size: var(--base-av-font-size);
  font-weight: var(--base-av-font-weight);
}
.onb-av--human { background: var(--base-human-av-bg); color: var(--base-human-av-text); }
.onb-av--agent { background: var(--onb-agent-av-bg); color: var(--onb-agent-av-text); }
.onb-card-meta { flex: 1; min-width: 0; }
.onb-from {
  font-size: var(--base-name-size); font-weight: var(--base-name-weight);
  font-style: var(--base-name-style); color: var(--base-name-color); display: inline;
}
.onb-agent-tag {
  display: inline-block;
  background: var(--onb-tag-bg); color: var(--onb-tag-color);
  font-size: var(--onb-tag-size); font-weight: 600;
  padding: var(--onb-tag-padding); border-radius: var(--onb-tag-radius);
  vertical-align: middle; margin-left: 6px; letter-spacing: 0.3px;
}
.onb-time {
  font-size: var(--base-time-size); font-weight: var(--base-time-weight);
  font-style: var(--base-time-style); color: var(--base-time-color);
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}

/* Card body */
.onb-card-body {
  padding: var(--base-card-body-padding);
  font-size: var(--base-body-size); font-weight: var(--base-body-weight);
  font-style: var(--base-body-style); color: var(--base-body-color);
  line-height: var(--base-body-line-height); text-wrap: pretty;
}
.onb-card-body strong { color: var(--base-name-color); font-weight: var(--base-body-strong-weight); }

/* Quote */
.onb-quote {
  margin-top: var(--base-quote-margin-top);
  padding: 7px 10px;
  border-left: 2px solid var(--base-quote-border);
  color: var(--base-quote-color); font-size: var(--base-quote-size);
  font-style: italic; line-height: 1.5; text-wrap: balance;
}

/* Attachment */
.onb-attach {
  margin-top: var(--base-attach-margin-top);
  background: var(--base-attach-bg); border: 1px solid var(--base-attach-border);
  border-radius: var(--base-attach-radius); padding: 8px 11px;
  display: flex; align-items: center; gap: 9px;
}
.onb-attach-icon { font-size: var(--base-attach-icon-size); flex-shrink: 0; line-height: 1; align-self: flex-start; margin-top: 2px; }
.onb-attach-info { flex: 1; min-width: 0; }
.onb-attach-name { font-size: var(--base-attach-name-size); font-weight: var(--base-attach-name-weight); color: var(--base-attach-name-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onb-attach-meta { font-size: var(--base-attach-meta-size); color: var(--base-attach-meta-color); margin-top: 1px; }
.onb-attach-open { font-size: var(--base-attach-open-size); font-weight: var(--base-attach-open-weight); color: var(--base-attach-open-color); flex-shrink: 0; }

/* Chat bubble layout (Teams-style) */
.chat-row {
  display: flex; align-items: flex-start; gap: 8px; flex-shrink: 0;
  opacity: 0; transform: translateX(-12px);
  transition: opacity 0.6s cubic-bezier(0.65, 0, 0.35, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.chat-row--human { flex-direction: row-reverse; transform: translateX(12px); }
.chat-row.entered { opacity: 1; transform: translateX(0); }
.chat-row.chat-dimmed { opacity: 0.48; }
.chat-av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geist', sans-serif; font-size: 8px; font-weight: 700; color: #fff;
}
.chat-av-spacer { width: 26px; flex-shrink: 0; }
.chat-content { display: flex; flex-direction: column; max-width: 78%; min-width: 0; }
.chat-content--human { align-items: flex-end; }
.chat-meta { display: flex; align-items: baseline; gap: 5px; padding: 0 3px; margin-bottom: 3px; }
.chat-meta-name { font-size: 11px; font-weight: 600; color: #374151; font-family: 'Geist', sans-serif; }
.chat-meta-time { font-size: 10px; color: #94A3B8; font-family: 'Geist', sans-serif; }
.chat-bubble {
  padding: 8px 11px; border-radius: 2px 12px 12px 12px;
  font-size: var(--base-body-size, 12px); line-height: 1.5;
  font-family: 'Geist', sans-serif; color: var(--base-body-color, #374151);
  background: var(--base-chat-agent-bg, #F1F5F9);
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  word-break: break-word; text-wrap: pretty;
}
.chat-row--human .chat-bubble {
  background: var(--base-chat-human-bg, #DBEAFE);
  border-radius: 12px 2px 12px 12px; color: #1e3a8a;
}
.chat-row.chat-grouped .chat-bubble { border-radius: 6px 12px 12px 12px; }
.chat-row--human.chat-grouped .chat-bubble { border-radius: 12px 6px 12px 12px; }
.chat-bubble .onb-attach { margin-top: 8px; background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.08); }

/* Right-aligned typing indicator (human is typing) */
.onb-incoming--right { justify-content: flex-end; }

/* Typing-as-text indicator */
.onb-typing-text { display: flex; align-items: center; gap: 4px; font-family: 'Geist', sans-serif; font-size: 12px; color: #64748b; }
.onb-typing-text-name { font-weight: 600; color: #475569; }
.onb-typing-text-body { font-weight: 400; }
.onb-typing-text-dots { display: inline-flex; align-items: center; gap: 2px; margin-left: 1px; }
.onb-typing-text-dots span {
  width: 3px; height: 3px; border-radius: 50%; background: #94a3b8;
  animation: typingBounce 1.4s ease-in-out infinite;
}
.onb-typing-text-dots span:nth-child(1) { animation-delay: 0s; }
.onb-typing-text-dots span:nth-child(2) { animation-delay: 0.18s; }
.onb-typing-text-dots span:nth-child(3) { animation-delay: 0.36s; }

/* Status chips */
.onb-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.onb-chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; font-family: 'Geist', sans-serif; letter-spacing: 0.1px; }
.onb-chip--blue   { background: rgba(37,99,235,0.12);  color: #2563eb; }
.onb-chip--green  { background: rgba(5,150,105,0.12);  color: #059669; }
.onb-chip--amber  { background: rgba(217,119,6,0.12);  color: #d97706; }
.onb-chip--purple { background: rgba(124,58,237,0.12); color: #7c3aed; }
.onb-chip--teal   { background: rgba(0,153,204,0.12);  color: #0099cc; }

/* Checklist summary (inside chat bubble) */
.bp-summary { background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 8px; padding: 10px 12px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; width: fit-content; }
.bp-summary-row { position: relative; padding-left: 26px; font-size: 12px; color: #374151; line-height: 1.4; min-height: 20px; }
.bp-check { position: absolute; left: 0; top: 0; color: #059669; transform: translateY(-1px); }
.chat-bubble .bp-summary { background: rgba(255,255,255,0.65); border-color: rgba(0,0,0,0.08); margin-top: 6px; margin-bottom: 2px; }

/* Date divider */
.bp-date-divider { display: flex; align-items: center; gap: 10px; padding: 4px 16px 2px; flex-shrink: 0; }
.bp-date-divider-line { flex: 1; height: 1px; background: #e2e8f0; }
.bp-date-divider-label { font-size: 11px; font-weight: 500; color: #94a3b8; font-family: 'Geist', sans-serif; white-space: nowrap; }

/* Compose bar */
.bp-compose { padding: 8px 16px 10px; border-top: 1px solid #e2e8f0; flex-shrink: 0; }
.bp-compose-input { background: transparent; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 12px; display: flex; align-items: center; }
.bp-compose-placeholder { font-size: 12px; color: #94a3b8; font-family: 'Geist', sans-serif; }

/* App label (e.g. Outlook on ONB) */
.onb-app-label { font-size: 12px; font-weight: 500; font-family: 'Geist', sans-serif; flex-shrink: 0; letter-spacing: 0.1px; }
.onb-app-label--outlook    { color: #0078D4; }
.onb-app-label--teams      { color: #6264A7; }
.onb-app-label--sharepoint { color: #038387; }
.onb-app-label--calendar   { color: #0078D4; }
.onb-app-label--build      { color: #64748B; }
.onb-app-label--person     { color: #64748B; }
.onb-app-label--vantaca    { color: #1e40af; }

/* Live indicator */
.onb-live { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.onb-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #5cb87a; animation: liveDotPulse 2s ease-in-out infinite; }
.onb-live-label { font-size: 12px; font-weight: 500; color: #5cb87a; font-family: 'Geist', sans-serif; letter-spacing: 0.1px; }
@keyframes liveDotPulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%       { opacity: 0.25; transform: scale(0.65); }
}

/* Activity Log */
.al-scroll-wrap { flex: 1; overflow: hidden; position: relative; }
.al-scroll-wrap::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 80px; background: linear-gradient(to top, var(--base-win-bg, #ffffff), transparent); pointer-events: none; z-index: 2; }
.al-stream { animation: al-scroll-up var(--al-scroll-dur, 20s) linear infinite; }
.al-stream.al-paused { animation-play-state: paused; }
@keyframes al-scroll-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.al-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.al-row:last-child { border-bottom: none; }
.al-time { font-size: 11px; color: var(--base-time-color, #9CA3AF); min-width: 50px; padding-top: 2px; font-weight: 400; letter-spacing: 0.2px; font-variant-numeric: tabular-nums; flex-shrink: 0; font-family: 'Geist', sans-serif; }
.al-badge { font-size: 9px; font-weight: 800; color: #fff; padding: 2px 5px; border-radius: 4px; flex-shrink: 0; margin-top: 2px; letter-spacing: 0.5px; font-family: 'Geist', sans-serif; }
.al-detail { flex: 1; min-width: 0; }
.al-action { font-size: var(--base-body-size, 12px); color: var(--base-name-color, #111827); font-weight: 600; margin-bottom: 2px; font-family: 'Geist', sans-serif; }
.al-meta { font-size: 11px; color: var(--base-time-color, #94A3B8); line-height: 1.4; font-family: 'Geist', sans-serif; }
.al-status { font-size: 10px; font-weight: 700; min-width: 52px; text-align: right; padding-top: 2px; flex-shrink: 0; font-family: 'Geist', sans-serif; }
.al-footer { padding: 10px 16px; border-top: 1px solid var(--base-card-border, rgba(0,0,0,0.06)); display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--base-time-color, #94A3B8); flex-shrink: 0; font-family: 'Geist', sans-serif; }
.al-footer-link { color: #2563eb; font-weight: 600; }

/* Agent badge inside gradient border */
.agent-badge { position: relative; }
.agent-badge::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.24), rgba(255,255,255,0.24));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

:host {
  display: block;
}

:host, .fg-component {
  --fg-green:        #63B249;
  --fg-blue:         rgba(96,165,250,0.75);
  --fg-amber:        #D97706;
  --fg-gap:          4px;
  --fg-radius:       6px;
  --fg-legend-bg:    #f8fafc;
  --fg-legend-color: #374151;
  --fg-legend-size:  0.9375rem;
  --fg-dot-green:    #63B249;
  --fg-dot-blue:     #60A5FA;
  --fg-dot-amber:    #D97706;
}

.fg-component {
  width: 100%;
  font-family: 'Geist', sans-serif;
  container-type: inline-size;
}

.fg-grid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: var(--fg-gap);
}

.fg-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--fg-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fg-warning-icon {
  display: block;
  pointer-events: none;
}

.fg-cell--green { background: var(--fg-green); }
.fg-cell--amber { background: var(--fg-amber); }

.fg-cell--blue {
  background: var(--fg-blue);
  animation: fg-blink var(--fg-blink-dur, 1.8s) ease-in-out var(--fg-blink-delay, 0s) infinite;
}

.fg-component.fg-paused .fg-cell--blue,
.fg-component.fg-paused .fg-legend-dot--blue {
  animation-play-state: paused;
}

@container (max-width: 480px) {
  .fg-cell { border-radius: 3px; }
}

/* ── Mobile: viewport-based so it fires reliably in Webflow shadow DOM ──────── */
@media (max-width: 420px) {
  .fg-component {
    --fg-gap: 3px;
  }

  /* 15 columns × 4 rows instead of 20 × 6 — bigger cells on mobile */
  .fg-grid {
    grid-template-columns: repeat(15, 1fr);
  }

  /* Hide cells beyond the first 60 (15 cols × 4 rows) */
  .fg-cell:nth-child(n+61) {
    display: none;
  }

  /* Scale down warning icon to fit the smaller cells */
  .fg-warning-icon {
    transform: scale(0.75);
  }

  /* Slightly smaller tags on mobile */
  .fg-legend-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
  }
}

@keyframes fg-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.fg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.fg-legend-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--fg-legend-bg);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: var(--fg-legend-size);
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  color: var(--fg-legend-color);
  white-space: nowrap;
}

.fg-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fg-legend-dot--green { background: var(--fg-dot-green); }
.fg-legend-dot--amber { background: var(--fg-dot-amber); }
.fg-legend-dot--blue  {
  background: var(--fg-dot-blue);
  animation: fg-blink 1.5s ease-in-out 0s infinite;
}

