/* Chatbot widget — scoped to .aitcb- prefix to avoid clobbering host site styles */
.aitcb-root { position: fixed; bottom: 20px; right: 20px; z-index: 2147483000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.aitcb-launcher { width: 60px; height: 60px; border-radius: 50%; border: none;
  background: var(--aitcb-accent, #2563eb); color: #fff; font-size: 28px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18); display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease; }
.aitcb-launcher:hover { transform: scale(1.05); }
.aitcb-launcher.open { background: var(--aitcb-primary, #0f172a); }

.aitcb-panel { position: absolute; bottom: 76px; right: 0; width: 380px; max-width: calc(100vw - 40px);
  height: 560px; max-height: calc(100vh - 120px); background: #fff; border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.22); display: none; flex-direction: column; overflow: hidden; }
.aitcb-panel.open { display: flex; }

.aitcb-header { background: var(--aitcb-primary, #0f172a); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; }
.aitcb-header-title { font-weight: 600; font-size: 15px; }
.aitcb-header-sub { font-size: 12px; opacity: 0.8; margin-top: 2px; }
.aitcb-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; opacity: 0.8; }
.aitcb-close:hover { opacity: 1; }

.aitcb-messages { flex: 1; overflow-y: auto; padding: 16px; background: #f8fafc; }
.aitcb-msg { margin-bottom: 12px; display: flex; }
.aitcb-msg.user { justify-content: flex-end; }
.aitcb-bubble { max-width: 80%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word; }
.aitcb-msg.bot .aitcb-bubble { background: #fff; color: #0f172a; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; }
.aitcb-msg.user .aitcb-bubble { background: var(--aitcb-accent, #2563eb); color: #fff; border-bottom-right-radius: 4px; }

.aitcb-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.aitcb-typing span { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8;
  animation: aitcb-bounce 1.2s infinite ease-in-out; }
.aitcb-typing span:nth-child(2) { animation-delay: 0.15s; }
.aitcb-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aitcb-bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }

.aitcb-suggestions { padding: 8px 16px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.aitcb-suggest { background: #fff; border: 1px solid #e2e8f0; color: #0f172a; font-size: 12px;
  padding: 6px 10px; border-radius: 14px; cursor: pointer; }
.aitcb-suggest:hover { border-color: var(--aitcb-accent, #2563eb); color: var(--aitcb-accent, #2563eb); }

.aitcb-input-row { border-top: 1px solid #e2e8f0; padding: 10px; display: flex; gap: 8px; background: #fff; }
.aitcb-input { flex: 1; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px;
  font-size: 14px; font-family: inherit; resize: none; outline: none; }
.aitcb-input:focus { border-color: var(--aitcb-accent, #2563eb); }
.aitcb-send { background: var(--aitcb-accent, #2563eb); color: #fff; border: none; border-radius: 10px;
  padding: 0 16px; font-weight: 600; cursor: pointer; font-size: 14px; }
.aitcb-send:disabled { opacity: 0.5; cursor: not-allowed; }

.aitcb-form { padding: 16px; background: #fff; border-top: 1px solid #e2e8f0; }
.aitcb-form h4 { margin: 0 0 10px; font-size: 15px; color: #0f172a; }
.aitcb-form label { display: block; font-size: 12px; color: #475569; margin-top: 8px; }
.aitcb-form input, .aitcb-form textarea { width: 100%; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 8px 10px; font-size: 14px; font-family: inherit; box-sizing: border-box; margin-top: 2px; }
.aitcb-form textarea { min-height: 60px; resize: vertical; }
.aitcb-form-actions { display: flex; gap: 8px; margin-top: 12px; }
.aitcb-form-submit { background: var(--aitcb-accent, #2563eb); color: #fff; border: none; border-radius: 8px;
  padding: 9px 14px; font-weight: 600; cursor: pointer; font-size: 13px; flex: 1; }
.aitcb-form-cancel { background: #f1f5f9; color: #475569; border: none; border-radius: 8px;
  padding: 9px 14px; cursor: pointer; font-size: 13px; }
.aitcb-form-error { color: #dc2626; font-size: 12px; margin-top: 8px; }
.aitcb-form-success { color: #16a34a; font-size: 13px; margin-top: 10px; text-align: center; }

.aitcb-booking { padding: 16px; background: #fff; border-top: 1px solid #e2e8f0; }
.aitcb-booking iframe { width: 100%; height: 380px; border: 1px solid #e2e8f0; border-radius: 8px; }
.aitcb-booking-link { display: inline-block; margin-top: 10px; color: var(--aitcb-accent, #2563eb);
  text-decoration: none; font-size: 13px; }

.aitcb-footer { padding: 6px 12px; text-align: center; font-size: 10px; color: #94a3b8; background: #fff; }
.aitcb-footer a { color: inherit; }

@media (max-width: 480px) {
  .aitcb-panel { width: calc(100vw - 20px); right: -10px; height: calc(100vh - 120px); }
}
