/* === agent c3: Sunny as a contextual assistant ===
   The "Brief me" card, structured answers (facts / likely / suggested), source chips, draft cards.
   Scoped to .c3-* inside the Sunny panel (.sn-panel). Quiet: color only for state, never decoration. */

/* ---- Brief me card (only when Sunny is opened on a customer or ticket) */
.sn-panel .sx-brief { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: rgb(255 255 255 / .78);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgb(var(--sg-blue-rgb) / .07), 0 4px 14px rgb(var(--sg-blue-rgb) / .06); }
.sn-panel .sx-brief-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.sn-panel .sx-brief-main { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: #fff; background: linear-gradient(180deg, var(--sg-blue-lift), var(--sg-blue));
  box-shadow: 0 6px 16px rgb(var(--sg-blue-rgb) / .24); transition: transform 100ms var(--ease-out); }
.sn-panel .sx-brief-main:active:not(:disabled) { transform: scale(.98); }
.sn-panel .sx-brief-main:focus-visible, .sn-panel .sx-p:focus-visible, .sn-panel .sx-src:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.sn-panel .sx-prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.sn-panel .sx-p { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 12px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 550; line-height: 1.2; color: var(--ink-2); text-align: left; background: rgb(var(--sg-blue-rgb) / .045);
  box-shadow: inset 0 0 0 1px rgb(var(--sg-blue-rgb) / .08); transition: transform 100ms var(--ease-out), background .15s; }
.sn-panel .sx-p .ico { color: var(--sg-blue-lift); flex: none; }
.sn-panel .sx-p:hover { background: #fff; }
.sn-panel .sx-p:active:not(:disabled) { transform: scale(.97); }
.sn-panel .sx-p:disabled, .sn-panel .sx-brief-main:disabled { opacity: .5; cursor: default; }
.sn-panel .sx-brief-f { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.sn-panel .sx-brief-f b { color: var(--ink-2); font-weight: 650; }
.sn-panel .sx-setup { font-size: 12px; color: var(--muted); }
.sn-panel .sx-setup summary { cursor: pointer; font-weight: 600; color: var(--sg-blue-lift); }
.sn-panel .sx-setup ol { margin: 6px 0 0; padding-left: 1.2em; line-height: 1.45; }
.sn-panel .sx-more { display: flex; justify-content: flex-start; padding-left: 32px; }
.sn-panel .sx-more .sx-prompts { padding: 2px 0; }

/* ---- structured answer */
.sn-panel .sx-ans { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.sn-panel .sx-mode { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 650; color: #6B4A00; background: rgb(var(--sg-gold-rgb) / .18); box-shadow: inset 0 0 0 1px rgb(var(--sg-gold-rgb) / .45); }
.sn-panel .sx-lead p { margin: 0; font-weight: 550; letter-spacing: -.005em; }
.sn-panel .sx-g { display: flex; flex-direction: column; gap: 4px; }
.sn-panel .sx-gh { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.sn-panel .sx-gh .sx-from { text-transform: none; letter-spacing: 0; font-weight: 500; }
.sn-panel .sx-g ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sn-panel .sx-g li { position: relative; padding-left: 13px; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.sn-panel .sx-g li::before { content: ""; position: absolute; left: 1px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-3); }
.sn-panel .sx-g.facts li::before { background: var(--sg-blue-lift); opacity: .7; }
.sn-panel .sx-g.inf li { color: var(--ink-2); font-style: normal; }
.sn-panel .sx-g.inf li::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-3); }
.sn-panel .sx-g.rec li::before { background: var(--sg-gold-deep); }
.sn-panel .sx-owner { display: inline-block; padding: 0 7px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600; color: var(--ink-2); background: rgb(var(--sg-blue-rgb) / .06); }
.sn-panel .sx-src { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 20px; padding: 0 8px; margin: 1px 0; vertical-align: 1px; border: 0; border-radius: var(--r-pill);
  cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; color: var(--sg-blue-lift); background: rgb(var(--sg-blue-rgb) / .06); transition: transform 100ms var(--ease-out), background .15s; }
.sn-panel .sx-src span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.sn-panel .sx-src:hover { background: rgb(var(--sg-blue-rgb) / .12); }
.sn-panel .sx-src:active { transform: scale(.96); }
.sn-panel .sx-note { font-size: 12px; line-height: 1.4; color: var(--muted); padding: 8px 10px; border-radius: 12px; background: rgb(var(--sg-blue-rgb) / .035); }
.sn-panel .sx-note b { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.sn-panel .sx-note ul { margin: 0; padding-left: 1.05em; }
.sn-panel .sx-note.stale { background: rgb(var(--sg-gold-rgb) / .09); }
.sn-panel .sx-notice { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.4; color: var(--muted); padding: 0 4px; }
.sn-panel .sx-notice .ico { flex: none; margin-top: 2px; }

/* ---- draft card (copy only) */
.sn-panel .sx-draft .sn-card-ico { color: #fff; background: linear-gradient(145deg, var(--sg-blue-lift), var(--sg-blue)); }
.sn-panel .sx-draft textarea.sn-card-text { font-family: inherit; white-space: pre-wrap; }
.sn-panel .sx-warn { display: flex; gap: 6px; align-items: center; font-size: 12px; color: #8A4B00; }

/* quick view and file preview opened from Sunny sit above the panel */
.sx-preview .fx-sheet-wrap { z-index: calc(var(--z-modal) + 1); }

@media (max-width: 700px) {
  .sn-panel .sx-p { font-size: 13px; min-height: 36px; }
  .sn-panel .sx-more { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sn-panel .sx-p, .sn-panel .sx-src, .sn-panel .sx-brief-main { transition: none; }
}
@media (prefers-contrast: more) {
  .sn-panel .sx-brief, .sn-panel .sx-p, .sn-panel .sx-src, .sn-panel .sx-note { box-shadow: 0 0 0 1px #6d7896; }
  .sn-panel .sx-gh, .sn-panel .sx-note b { color: var(--ink-2); }
}
/* === end agent c3 === */
