/* Grok Bot Center chat bubble (2026-11-28). Dark text on light backgrounds. */
.gbc-chat, .gbc-chat * { box-sizing: border-box; }
.gbc-chat { --gc-navy: #15263D; --gc-navy2: #1E3A5F; --gc-ink: #111827; --gc-muted: #374151; --gc-line: #D1D5DB; --gc-bg: #FFFFFF; --gc-soft: #F1F5F9; --gc-accent: #C2410C;
  position: fixed; right: 20px; bottom: 20px; z-index: 9999; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--gc-ink); }
.gbc-chat-launch { display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; padding: 8px 18px 8px 8px; border-radius: 999px;
  background: #FFFFFF; color: var(--gc-ink); font: 600 16px/1.2 inherit; font-family: inherit; box-shadow: 0 6px 24px rgba(15, 23, 42, .28), 0 0 0 1px rgba(15,23,42,.08); }
.gbc-chat-launch:hover { box-shadow: 0 8px 28px rgba(15, 23, 42, .35), 0 0 0 2px var(--gc-navy2); }
.gbc-chat-launch:focus-visible, .gbc-chat button:focus-visible, .gbc-chat a:focus-visible, .gbc-chat textarea:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }
.gbc-chat-orb { width: 44px; height: 44px; flex: none; display: block; }
.gbc-chat-orb.gbc-chat-orb-sm { width: 32px; height: 32px; }
.gbc-chat-orb .eye { transform-origin: center; animation: gbcBlink 5s infinite; }
@keyframes gbcBlink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.15); } }
@media (prefers-reduced-motion: reduce) { .gbc-chat-orb .eye { animation: none; } .gbc-chat-dots span { animation: none !important; } }
.gbc-chat.open .gbc-chat-launch { display: none; }

.gbc-chat-panel { display: none; flex-direction: column; width: 380px; max-width: calc(100vw - 24px); height: 580px; max-height: calc(100vh - 40px);
  background: var(--gc-bg); color: var(--gc-ink); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(15, 23, 42, .35), 0 0 0 1px rgba(15,23,42,.1); }
.gbc-chat.open .gbc-chat-panel { display: flex; }
.gbc-chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--gc-navy); color: #FFFFFF; }
.gbc-chat-head .gbc-chat-ttl { flex: 1; min-width: 0; }
.gbc-chat-head h2 { margin: 0; font-size: 16px; line-height: 1.2; font-weight: 700; color: #FFFFFF; }
.gbc-chat-head p { margin: 2px 0 0; font-size: 13px; color: #E5E7EB; }
.gbc-chat-close { border: 0; background: transparent; color: #FFFFFF; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 24px; line-height: 1; }
.gbc-chat-close:hover { background: rgba(255,255,255,.14); }

.gbc-chat-log { flex: 1; overflow-y: auto; padding: 14px; background: var(--gc-soft); display: flex; flex-direction: column; gap: 10px; }
.gbc-chat-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.gbc-chat-msg.gbc-m-bot { align-self: flex-start; background: #FFFFFF; color: var(--gc-ink); border: 1px solid var(--gc-line); border-bottom-left-radius: 4px; }
.gbc-chat-msg.gbc-m-me { align-self: flex-end; background: #DBEAFE; color: #0B1F3A; border: 1px solid #BFDBFE; border-bottom-right-radius: 4px; }
.gbc-chat-msg.gbc-m-err { align-self: flex-start; background: #FFF7ED; color: #7C2D12; border: 1px solid #FDBA74; }
.gbc-chat-msg a { color: #1D4ED8; font-weight: 600; text-decoration: underline; }
.gbc-chat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gbc-chat-chip { border: 1px solid var(--gc-navy2); background: #FFFFFF; color: var(--gc-navy); border-radius: 999px; padding: 7px 12px; font: 600 14px/1.2 inherit; font-family: inherit; cursor: pointer; text-align: left; }
.gbc-chat-chip:hover { background: #E0E7FF; }
.gbc-chat-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.gbc-chat-dots span { width: 7px; height: 7px; border-radius: 50%; background: #4B5563; animation: gbcDot 1.2s infinite ease-in-out; }
.gbc-chat-dots span:nth-child(2) { animation-delay: .15s; } .gbc-chat-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes gbcDot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.gbc-chat-form { display: flex; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid var(--gc-line); background: #FFFFFF; }
.gbc-chat-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gbc-chat-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 110px; padding: 10px 12px; border: 1px solid #9CA3AF; border-radius: 12px; font: 16px/1.35 inherit; font-family: inherit; color: var(--gc-ink); background: #FFFFFF; }
.gbc-chat-form textarea::placeholder { color: #6B7280; }
.gbc-chat-send { border: 0; border-radius: 12px; padding: 0 16px; min-width: 64px; background: var(--gc-navy2); color: #FFFFFF; font: 700 15px/1 inherit; font-family: inherit; cursor: pointer; }
.gbc-chat-send:disabled { background: #9CA3AF; color: #111827; cursor: default; }
.gbc-chat-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 12px 10px; background: #FFFFFF; font-size: 12.5px; color: var(--gc-muted); }
.gbc-chat-foot a { color: #1D4ED8; font-weight: 700; text-decoration: underline; white-space: nowrap; }

body.gbc-chat-on { padding-bottom: 88px; }
@media (max-width: 520px) {
  .gbc-chat { right: 12px; bottom: 12px; }
  .gbc-chat-launch { padding: 5px; }
  .gbc-chat-launch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gbc-chat-launch .gbc-chat-orb { width: 46px; height: 46px; }
  body.gbc-chat-on { padding-bottom: 76px; }
  .gbc-chat.gbc-chat-wait:not(.open) { opacity: 0; visibility: hidden; transform: translateY(12px); }
  .gbc-chat { transition: opacity .25s ease, transform .25s ease, visibility .25s; }
  .gbc-chat.open { left: 0; right: 0; bottom: 0; top: 0; }
  .gbc-chat-panel { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .gbc-chat-msg { max-width: 92%; }
}
@media print { .gbc-chat { display: none; } body.gbc-chat-on { padding-bottom: 0; } }
