/* Site AI Chat - colours come from the site profile (--sac-*) */
#tfc-root { position: fixed; right: 20px; bottom: 20px; z-index: 99990; font-size: 15px; line-height: 1.45; font-family: inherit; color: var(--sac-primary); }
#tfc-root *, #tfc-root *::before, #tfc-root *::after { box-sizing: border-box; }
#tfc-root button { font-family: inherit; cursor: pointer; }

.tfc-launcher { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--sac-primary); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(17, 21, 27, .25); }
.tfc-launcher:hover { background: var(--sac-primary-hover); }
.tfc-launcher:focus-visible, .tfc-panel button:focus-visible, .tfc-input:focus-visible { outline: 2px solid var(--sac-accent); outline-offset: 2px; }

.tfc-panel { width: 360px; height: 520px; max-height: calc(100vh - 40px); background: #fff; border: 1px solid #e3e5e8; border-radius: 12px; box-shadow: 0 8px 30px rgba(17, 21, 27, .18); display: flex; flex-direction: column; overflow: hidden; }
.tfc-panel[hidden] { display: none; }

.tfc-head { background: var(--sac-primary); color: #fff; padding: 12px 12px 12px 16px; display: flex; align-items: center; gap: 8px; }
.tfc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tfc-title strong { font-size: 15px; font-weight: 600; }
.tfc-sub { font-size: 12px; color: #c9ccd1; }
.tfc-human { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.7); border-radius: 6px; padding: 5px 8px; font-size: 12px; white-space: nowrap; }
.tfc-human:hover { background: #fff; color: var(--sac-primary); }
.tfc-close { background: transparent; border: 0; color: #fff; font-size: 24px; line-height: 1; padding: 0 4px; }

.tfc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f7f8f9; }
.tfc-msg { max-width: 85%; padding: 9px 12px; border-radius: 10px; word-wrap: break-word; overflow-wrap: anywhere; font-size: 14px; }
.tfc-assistant { align-self: flex-start; background: #fff; border: 1px solid #e3e5e8; }
.tfc-user { align-self: flex-end; background: var(--sac-primary); color: #fff; }
.tfc-msg a { color: inherit; text-decoration: underline; }
.tfc-typing { color: #6b7079; letter-spacing: 2px; }

.tfc-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.tfc-chip, .tfc-handoff { background: #fff; border: 1px solid var(--sac-primary); color: var(--sac-primary); border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.tfc-chip:hover, .tfc-handoff:hover { background: var(--sac-primary); color: #fff; }
.tfc-handoff { align-self: flex-start; }

.tfc-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e3e5e8; background: #fff; }
.tfc-input { flex: 1; resize: none; border: 1px solid #cfd3d8; border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 14px; color: var(--sac-primary); max-height: 96px; }
.tfc-send { background: var(--sac-accent); color: var(--sac-accent-text); border: 0; border-radius: 8px; padding: 0 14px; font-weight: 600; font-size: 14px; }
.tfc-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 480px) {
  #tfc-root { right: 12px; bottom: 12px; }
  .tfc-panel { position: fixed; inset: auto 0 0 0; width: 100%; height: 85vh; max-height: 85vh; border-radius: 12px 12px 0 0; }
}
