/* Switchboard shared chat widget styles. System: navy #0b1f3a + green #15803d (AA). */
:root { --brand: #0b1f3a; --brand-dark: #071628; --accent: #15803d; --accent-dark: #166534; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #eef2f6; color: #1f2937; }
.demo-banner { background: #fef3c7; color: #92400e; font-size: 13px; padding: 10px 24px; border-bottom: 1px solid #fde68a; line-height: 1.5; }
.chat-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #fff; box-shadow: 0 0 24px rgba(0,0,0,.06); }
.chat-header { padding: 18px 24px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; display: flex; gap: 12px; align-items: center; }
.chat-header .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.chat-header .biz-line { font-size: 13px; opacity: .85; }
.chat { flex: 1; padding: 18px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #f8fafc;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; min-height: 40vh; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }
.bot { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px 16px 16px 4px; align-self: flex-start; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.user { background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; align-self: flex-end; }
.typing { display: inline-flex; gap: 4px; padding: 12px 16px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: blink 1.1s infinite; }
.typing span:nth-child(2) { animation-delay: .18s; } .typing span:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.chip { border: 1.5px solid var(--accent); color: var(--accent); background: #fff; border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  min-height: 40px; touch-action: manipulation; }
.chip:hover { background: #f0fdf4; }
.chip:active { background: #dcfce7; }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.inputbar { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #e2e8f0; background: #fff;
  position: sticky; bottom: 0; z-index: 5; }
.inputbar input { flex: 1; border: 1.5px solid #e2e8f0; border-radius: 999px; padding: 10px 16px; font-size: 14px; outline: none; min-width: 0; }
.inputbar input:focus { border-color: var(--accent); }
.inputbar button { background: var(--brand); color: #fff; border: none; border-radius: 999px; padding: 10px 20px; font-size: 14px; cursor: pointer;
  min-height: 44px; touch-action: manipulation; }
.inputbar button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.demo-note { font-size: 12px; color: #64748b; padding: 8px 16px 4px; background: #fff; text-align: center; }
.demo-footer { text-align: center; font-size: 12px; color: #94a3b8; padding: 14px 16px 20px; background: #fff; }
.demo-footer a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 380px) {
  .demo-banner { padding: 8px 16px; }
  .chat { padding: 14px 12px; }
  .inputbar { padding: 10px 12px; }
}
