/* Switchboard shared chat widget styles. Brand color via --brand / --brand-dark. */
:root { --brand: #0e7490; --brand-dark: #155e75; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #eef2f6; color: #1f2937; }
.page { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #fff; box-shadow: 0 0 24px rgba(0,0,0,.06); }
.site-header { padding: 28px 24px 18px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; }
.site-header h1 { font-size: 22px; letter-spacing: .3px; }
.site-header p { font-size: 13px; opacity: .85; margin-top: 4px; }
.demo-banner { background: #fef3c7; color: #92400e; font-size: 12px; padding: 8px 24px; border-bottom: 1px solid #fde68a; }
.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(--brand); color: var(--brand); background: #fff; border-radius: 999px; padding: 9px 16px; font-size: 13px; cursor: pointer;
  min-height: 40px; touch-action: manipulation; }
.chip:hover { background: #f0fdfa; }
.chip:active { background: #eef2ff; }
.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(--brand); }
.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; }
.footer { text-align: center; font-size: 11px; color: #94a3b8; padding: 10px; background: #fff; }

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