/* Chatbot Engine Connector: test console and administrators-only test bubble. */
.cec-chat { --cec-accent: #167d7f; --cec-ink: #14212e; --cec-line: #c9d1d5; --cec-soft: #f5f7f8; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--cec-ink); }
.cec-chat * { box-sizing: border-box; }
.cec-console { max-width: 820px; background: #fff; border: 1px solid var(--cec-line); border-radius: 10px; padding: 12px; }
.cec-log { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.cec-console .cec-log { height: 460px; padding: 4px; }
.cec-msg { max-width: 88%; display: flex; flex-direction: column; gap: 4px; }
.cec-user { align-self: flex-end; }
.cec-assistant { align-self: flex-start; }
.cec-text { white-space: pre-wrap; word-wrap: break-word; padding: 8px 12px; border-radius: 12px; background: var(--cec-soft); border: 1px solid var(--cec-line); }
.cec-user .cec-text { background: var(--cec-accent); border-color: var(--cec-accent); color: #fff; }
.cec-user .cec-text a { color: #fff; }
.cec-error .cec-text { background: #fdecea; border-color: #b3261e; color: #b3261e; }
.cec-waiting .cec-text { color: #7e8c9c; font-style: italic; }
.cec-sources { font-size: 13px; }
.cec-sources summary { cursor: pointer; color: var(--cec-accent); }
.cec-sources ul { margin: 4px 0 0 0; padding-left: 18px; }
.cec-sources li { margin: 2px 0; }
.cec-kind { display: inline-block; min-width: 110px; color: #7e8c9c; margin-right: 6px; }
.cec-note, .cec-meta { font-size: 12px; color: #7e8c9c; }
.cec-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.cec-form textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--cec-line); border-radius: 8px; resize: vertical; }
.cec-form textarea:focus { outline: 2px solid var(--cec-accent); border-color: var(--cec-accent); }
.cec-buttons { display: flex; gap: 8px; align-items: center; }
.cec-send { font: inherit; font-weight: 600; background: var(--cec-accent); color: #fff; border: 0; border-radius: 8px; padding: 7px 16px; cursor: pointer; }
.cec-send:disabled { opacity: .6; cursor: wait; }
.cec-reset { font: inherit; font-size: 13px; background: none; border: 0; color: #7e8c9c; text-decoration: underline; cursor: pointer; }
.cec-status-warn { color: #8a5a00; font-weight: 600; }

.cec-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.cec-quick-btn { font: inherit; font-size: 14px; background: #fff; color: var(--cec-accent); border: 1px solid var(--cec-accent); border-radius: 16px; padding: 5px 12px; cursor: pointer; }
.cec-quick-btn:hover { background: var(--cec-accent); color: #fff; }

.cec-compare-pick { max-width: 820px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.cec-compare-wrap { max-width: 100%; width: 100%; }
.cec-compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cec-compare-col { display: flex; flex-direction: column; gap: 4px; }
.cec-compare-head { font-weight: 600; font-size: 13px; color: var(--cec-accent); }
.cec-compare-col.cec-error .cec-text { background: #fdecea; border-color: #b3261e; color: #b3261e; }

/* Send to a person (step 8) */
.cec-handoff { margin-top: 6px; }
.cec-handoff-open { font: inherit; font-size: 13px; background: #fff; color: var(--cec-accent); border: 1px solid var(--cec-accent); border-radius: 16px; padding: 4px 12px; cursor: pointer; }
.cec-handoff-form { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid #d5dde3; border-radius: 10px; padding: 10px; font-size: 13px; }
.cec-handoff-form label { display: flex; flex-direction: column; gap: 2px; }
.cec-handoff-form input[type=text], .cec-handoff-form input[type=email], .cec-handoff-form textarea { font: inherit; border: 1px solid #c3ccd5; border-radius: 6px; padding: 5px 7px; }
.cec-handoff-form label.cec-consent { display: block; }
.cec-handoff-msg { color: #b3261e; font-size: 13px; }
.cec-handoff-done { background: #e8f5ee; border: 1px solid #2e7d4f; color: #1f5e3a; border-radius: 10px; padding: 8px 10px; font-size: 13px; }

/* Bubble on the live website */
.cec-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 99998; min-width: 60px; height: 60px; padding: 0 18px; border-radius: 30px; border: 0; background: var(--cec-btn, #167d7f); display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font: 600 16px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; box-shadow: 0 4px 14px rgba(12, 36, 60, .3); cursor: pointer; }
.cec-launcher:focus-visible { outline: 3px solid #0c243c; outline-offset: 2px; }
.cec-panel { position: fixed; right: 20px; bottom: 92px; z-index: 99999; width: 370px; max-width: calc(100vw - 24px); height: 540px; max-height: calc(100vh - 120px); background: #fff; border: 1px solid var(--cec-line); border-radius: 14px; box-shadow: 0 10px 30px rgba(12, 36, 60, .25); display: flex; flex-direction: column; overflow: hidden; }
.cec-panel[hidden] { display: none; }
.cec-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--cec-head, #0c243c); color: #fff; }
.cec-badge { white-space: nowrap; flex-shrink: 0; font-size: 11px; background: #55c2c3; color: #0c243c; border-radius: 10px; padding: 2px 8px; font-weight: 600; }
.cec-close { margin-left: auto; background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.cec-body { flex: 1; display: flex; flex-direction: column; padding: 10px; min-height: 0; }
.cec-body .cec-log { flex: 1; min-height: 0; }
/* Go-live (step 10) */
.cec-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Appearance (step 9) */
.cec-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cec-launcher.cec-left, .cec-panel.cec-left { right: auto; left: 20px; }
.cec-launcher.cec-style-icon { width: 60px; padding: 0; }
.cec-launch-icon { display: inline-flex; }
.cec-launch-x { font-size: 26px; line-height: 1; }
.cec-readmore { font-size: 13px; margin-top: 4px; }
.cec-readmore a { color: var(--cec-accent); }
@media (max-width: 480px) {
  .cec-panel { right: 12px; left: 12px; width: auto; bottom: 84px; }
  .cec-launcher { right: 12px; bottom: 12px; }
  .cec-launcher.cec-left { left: 12px; right: auto; }
  .cec-launcher.cec-style-icon_label { width: 60px; padding: 0; }
  .cec-launcher.cec-style-icon_label .cec-launch-text { display: none; }
  .cec-panel.cec-mobile-full { inset: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: 0; z-index: 100000; }
}
