/* Shieldline Auto Group chatbot widget — brand-matched, mobile-responsive. */

#brand-chatbot { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

#brand-chatbot .cb-chat-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap; border: 0; padding: 0;
}

/* Floating button */
#brand-chatbot .cb-chat-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 9990;
  width: 60px; height: 60px; border-radius: 50%;
  background: #181c21; color: #7db2e0; border: 2px solid #7db2e0;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  transition: transform .18s ease, box-shadow .18s ease;
}
#brand-chatbot .cb-chat-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.6); }
#brand-chatbot .cb-chat-btn:focus-visible { outline: 3px solid #7db2e0; outline-offset: 3px; }
#brand-chatbot .cb-chat-btn-dot {
  position: absolute; top: 2px; right: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: #2fbf71; border: 2px solid #181c21;
}

/* Panel */
#brand-chatbot .cb-chat-panel {
  position: fixed; right: 22px; bottom: 94px; z-index: 9991;
  width: 380px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 130px);
  background: #20252c; color: #f1f4f8; border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid #3a4450;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
#brand-chatbot .cb-chat-panel[hidden] { display: none; }

#brand-chatbot .cb-chat-header {
  background: #14181d; color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 3px solid #7db2e0; flex: 0 0 auto;
}
#brand-chatbot .cb-chat-header-text strong { display: block; font-size: 1.02rem; letter-spacing: .01em; }
#brand-chatbot .cb-chat-header-text span { display: block; font-size: .72rem; color: #bcc6d1; margin-top: 2px; }
#brand-chatbot .cb-chat-close {
  background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: .9rem; line-height: 1;
}
#brand-chatbot .cb-chat-close:hover { background: rgba(255,255,255,.12); }
#brand-chatbot .cb-chat-close:focus-visible { outline: 3px solid #7db2e0; outline-offset: 2px; }

#brand-chatbot .cb-chat-log {
  flex: 1 1 auto; overflow-y: auto; padding: 14px 14px 6px;
  display: flex; flex-direction: column; gap: 10px;
}
#brand-chatbot .cb-msg { max-width: 88%; font-size: .9rem; line-height: 1.5; }
#brand-chatbot .cb-msg p { margin: 0 0 .5em; }
#brand-chatbot .cb-msg p:last-child { margin-bottom: 0; }
#brand-chatbot .cb-msg-bot {
  align-self: flex-start; background: #272e38; color: #f1f4f8;
  border: 1px solid #3a4450; border-radius: 4px 14px 14px 14px; padding: 10px 12px;
}
#brand-chatbot .cb-msg-user {
  align-self: flex-end; background: #7db2e0; color: #10151b;
  border-radius: 14px 4px 14px 14px; padding: 10px 12px; font-weight: 500;
}
#brand-chatbot .cb-msg a { color: #a9cdf0; font-weight: 600; text-decoration: underline; }
#brand-chatbot .cb-msg a:focus-visible { outline: 2px solid #7db2e0; outline-offset: 2px; }

/* Typing indicator */
#brand-chatbot .cb-typing span {
  display: inline-block; width: 7px; height: 7px; margin-right: 4px;
  background: #8d98a6; border-radius: 50%; opacity: .5;
  animation: cb-blink 1s infinite;
}
#brand-chatbot .cb-typing span:nth-child(2) { animation-delay: .15s; }
#brand-chatbot .cb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cb-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* Quick-reply chips */
#brand-chatbot .cb-chat-chips {
  flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 14px;
  border-top: 1px solid #3a4450; background: #20252c;
}
#brand-chatbot .cb-chip {
  background: transparent; color: #f1f4f8; border: 1.5px solid #7db2e0; border-radius: 999px;
  padding: 6px 14px; font-size: .8rem; font-weight: 600; cursor: pointer;
}
#brand-chatbot .cb-chip:hover { background: #7db2e0; color: #10151b; }
#brand-chatbot .cb-chip:focus-visible { outline: 3px solid #7db2e0; outline-offset: 2px; }

/* Human handoff card */
#brand-chatbot .cb-card-links { display: flex; flex-direction: column; gap: 6px; margin: .6em 0; }
#brand-chatbot .cb-card-link {
  display: block; text-align: center; background: #7db2e0; color: #10151b !important;
  border-radius: 10px; padding: 9px 12px; font-weight: 700; text-decoration: none !important;
}
#brand-chatbot .cb-card-link:hover { background: #a9cdf0; }
#brand-chatbot .cb-card-note { font-size: .78rem; color: #8d98a6; }

/* Input */
#brand-chatbot .cb-chat-form {
  flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 14px 14px; background: #20252c;
}
#brand-chatbot .cb-chat-input {
  flex: 1 1 auto; border: 1.5px solid #3a4450; border-radius: 999px;
  padding: 10px 16px; font-size: .9rem; color: #f1f4f8; background: #181c21; min-width: 0;
}
#brand-chatbot .cb-chat-input:focus { outline: none; border-color: #7db2e0; box-shadow: 0 0 0 3px rgba(125,178,224,.35); }
#brand-chatbot .cb-chat-send {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: none;
  background: #7db2e0; color: #10151b; font-size: 1.1rem; cursor: pointer;
}
#brand-chatbot .cb-chat-send:hover { background: #a9cdf0; }
#brand-chatbot .cb-chat-send:focus-visible { outline: 3px solid #f1f4f8; outline-offset: 2px; }

/* Small screens */
@media (max-width: 480px) {
  #brand-chatbot .cb-chat-panel { right: 12px; bottom: 86px; width: calc(100vw - 24px); }
  #brand-chatbot .cb-chat-btn { right: 16px; bottom: 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #brand-chatbot .cb-chat-btn { transition: none; }
  #brand-chatbot .cb-typing span { animation: none; opacity: .8; }
}
