/* ── CHATBOT WIDGET ─────────────────────────────────────────────────────── */

/* Floating button */
.cb-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 10000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1e1e1e;
  border: 2px solid rgba(255,255,255,0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cb-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.cb-fab svg { width: 24px; height: 24px; color: #f5f5f5; }
.cb-fab .cb-fab-close { display: none; }
.cb-fab.open .cb-fab-icon { display: none; }
.cb-fab.open .cb-fab-close { display: block; }

/* WhatsApp-style notification bubble */
.cb-notify {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 10001;
  max-width: 260px;
  background: #1e1e1e;
  color: #f5f5f5;
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.cb-notify.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.cb-notify-name {
  font-size: 11px;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.cb-notify-close {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 14px;
  color: #888;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
.cb-notify-close:hover { color: #f5f5f5; }

/* Unread dot */
.cb-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 10px; height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #1e1e1e;
  display: none;
}
.cb-badge.show { display: block; }

/* Panel */
.cb-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 9999;
  width: 400px;
  max-width: calc(100vw - 40px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: #f7f7f7;
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.22), 0 0 0 0.5px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.28s ease;
}
.cb-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.cb-header {
  padding: 0;
  flex-shrink: 0;
  background: #111;
  position: relative;
  overflow: hidden;
}
.cb-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 0%, rgba(34,197,94,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.cb-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  position: relative;
  z-index: 1;
}
.cb-header-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #252525, #3a3a3a);
  border: 1.5px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.cb-header-avatar svg { width: 20px; height: 20px; color: #f0f0f0; }
.cb-header-avatar::after {
  content: '';
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #111;
  box-shadow: 0 0 6px rgba(34,197,94,0.5);
}
.cb-header-info { flex: 1; min-width: 0; }
.cb-header-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  color: #f5f5f5;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.cb-header-status {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #22c55e;
  display: flex; align-items: center; gap: 4px;
  margin-top: 2px;
  font-weight: 500;
}
.cb-header-meta {
  font-size: 10px;
  color: #444;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  padding: 3px 8px;
  border-radius: 100px;
  border: 0.5px solid rgba(255,255,255,0.08);
}
.cb-header-bar {
  height: 2px;
  background: linear-gradient(to right, #22c55e, #16a34a, transparent);
  opacity: 0.6;
}

/* Messages area */
.cb-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  background: #f7f7f7;
}
.cb-messages::-webkit-scrollbar { width: 3px; }
.cb-messages::-webkit-scrollbar-track { background: transparent; }
.cb-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* Bubbles */
.cb-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: break-word;
  animation: cb-bubble-in 0.25s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes cb-bubble-in {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cb-bubble.bot {
  background: #f0f0f0;
  color: #1e1e1e;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.cb-bubble.user {
  background: #1e1e1e;
  color: #f5f5f5;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Greeting card */
.cb-greeting-card {
  align-self: stretch;
  background: #fff;
  border: 0.5px solid #e4e4e4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  animation: cb-bubble-in 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
.cb-greeting-top {
  background: linear-gradient(135deg, #111 0%, #1e1e1e 50%, #252525 100%);
  padding: 18px 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.cb-greeting-top::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(34,197,94,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.cb-greeting-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.cb-greeting-avatar svg { width: 20px; height: 20px; color: #f0f0f0; }
.cb-greeting-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  color: #f5f5f5;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.cb-greeting-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #22c55e;
  margin-top: 2px;
  font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.cb-greeting-subtitle::before {
  content: '';
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
  display: inline-block;
  animation: cb-pulse 2s infinite;
}
@keyframes cb-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.cb-greeting-body {
  padding: 16px 18px 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  color: #1e1e1e;
  line-height: 1.65;
}
.cb-greeting-body strong { font-weight: 600; }
.cb-greeting-divider {
  height: 0.5px;
  background: #efefef;
  margin: 12px 18px;
}
.cb-greeting-label {
  padding: 0 18px 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cb-greeting-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 18px;
}
.cb-greeting-chip {
  padding: 6px 13px;
  background: #f5f5f5;
  border: 1px solid #e4e4e4;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #1e1e1e;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  font-weight: 500;
}
.cb-greeting-chip:hover {
  background: #1e1e1e;
  color: #f5f5f5;
  border-color: #1e1e1e;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

/* Typing indicator */
.cb-typing {
  align-self: flex-start;
  background: #f0f0f0;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  display: flex; gap: 4px; align-items: center;
}
.cb-typing span {
  width: 6px; height: 6px;
  background: #aaa;
  border-radius: 50%;
  animation: cb-bounce 1.2s infinite;
}
.cb-typing span:nth-child(2) { animation-delay: 0.2s; }
.cb-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cb-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* Suggestion cards */
.cb-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.cb-card {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  font-family: 'DM Sans', sans-serif;
}
.cb-card:hover { border-color: #1e1e1e; }
.cb-card.selected {
  border-color: #1e1e1e;
  background: #1e1e1e;
}
.cb-card.selected .cb-card-title { color: #f5f5f5; }
.cb-card.selected .cb-card-desc { color: #a0a0a0; }
.cb-card.selected .cb-card-meta { color: #888; }
.cb-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.cb-card-title {
  font-size: 13px; font-weight: 600;
  color: #1e1e1e; line-height: 1.3;
}
.cb-card-check {
  width: 18px; height: 18px;
  border: 1.5px solid #d0d0d0;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.cb-card.selected .cb-card-check {
  background: #22c55e;
  border-color: #22c55e;
}
.cb-card-check svg { width: 10px; height: 10px; color: #fff; display: none; }
.cb-card.selected .cb-card-check svg { display: block; }
.cb-card-desc { font-size: 12px; color: #5e5e5e; line-height: 1.4; margin-bottom: 6px; }
.cb-card-meta {
  font-size: 11px; color: #888;
  display: flex; gap: 10px;
}
.cb-card-meta span { display: flex; align-items: center; gap: 3px; }

/* Confirm selection button */
.cb-confirm-btn {
  margin-top: 6px;
  padding: 9px 18px;
  background: #1e1e1e;
  color: #f5f5f5;
  border: none;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.18s;
}
.cb-confirm-btn:hover { opacity: 0.75; }

/* Pricing table */
.cb-pricing {
  background: #fff;
  border: 0.5px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  margin-top: 4px;
  font-family: 'DM Sans', sans-serif;
}
.cb-pricing-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 9px 12px;
  font-size: 12px;
  border-bottom: 0.5px solid #f0f0f0;
  align-items: center;
}
.cb-pricing-row:last-child { border-bottom: none; }
.cb-pricing-row.header {
  background: #f5f5f5;
  font-size: 10px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cb-pricing-name { color: #1e1e1e; font-weight: 500; }
.cb-pricing-time { color: #5e5e5e; white-space: nowrap; }
.cb-pricing-price { color: #1e1e1e; font-weight: 600; white-space: nowrap; }

/* Book call button */
.cb-book-btn {
  padding: 11px 20px;
  background: #1e1e1e;
  color: #f5f5f5;
  border: none;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.18s;
}
.cb-book-btn:hover { opacity: 0.75; }
.cb-book-btn svg { width: 14px; height: 14px; }

/* ── Inline booking picker ── */
.cb-booking {
  width: 100%;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 4px;
  font-family: 'DM Sans', sans-serif;
}
.cb-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid #f0f0f0;
}
.cb-cal-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e1e1e;
}
.cb-cal-nav {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #5e5e5e;
  padding: 0 6px;
  line-height: 1;
  transition: color 0.15s;
}
.cb-cal-nav:hover { color: #1e1e1e; }
.cb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px 10px 10px;
}
.cb-cal-dayname {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: #aaa;
  padding-bottom: 4px;
  text-transform: uppercase;
}
.cb-cal-cell {
  text-align: center;
  font-size: 12px;
  padding: 6px 2px;
  border-radius: 6px;
  cursor: default;
  transition: background 0.15s, color 0.15s;
}
.cb-cal-cell.empty { background: none; }
.cb-cal-cell.disabled { color: #ccc; }
.cb-cal-cell.available {
  color: #1e1e1e;
  cursor: pointer;
  font-weight: 500;
}
.cb-cal-cell.available:hover { background: #f0f0f0; }
.cb-cal-cell.selected {
  background: #1e1e1e !important;
  color: #fff !important;
  font-weight: 600;
}
.cb-time-label {
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 14px 6px;
}
.cb-time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 12px;
}
.cb-time-slot {
  font-size: 12px;
  font-weight: 500;
  color: #1e1e1e;
  background: #f5f5f5;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cb-time-slot:hover { background: #ececec; }
.cb-time-slot.selected {
  background: #1e1e1e;
  border-color: #1e1e1e;
  color: #fff;
}
.cb-booking-confirm {
  padding: 10px 12px 12px;
  border-top: 1px solid #f0f0f0;
}
.cb-booking-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #1e1e1e;
  margin-bottom: 8px;
}
.cb-booking-summary svg { width: 13px; height: 13px; flex-shrink: 0; }
.cb-booking-btn {
  width: 100%;
  background: #1e1e1e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.cb-booking-btn:hover { opacity: 0.8; }
.cb-booking-done {
  text-align: center;
  padding: 24px 16px;
}
.cb-booking-done-icon {
  width: 40px; height: 40px;
  background: #1e1e1e;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin: 0 auto 10px;
}
.cb-booking-done-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e1e1e;
  margin-bottom: 4px;
}
.cb-booking-done-detail {
  font-size: 13px;
  font-weight: 500;
  color: #3a3a3a;
  margin-bottom: 6px;
}
.cb-booking-done-note {
  font-size: 11px;
  color: #888;
}

/* Input area */
.cb-input-area {
  padding: 12px 14px 14px;
  border-top: 0.5px solid #ececec;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
  background: #fff;
}
.cb-input {
  flex: 1;
  border: 1.5px solid #e8e8e8;
  border-radius: 14px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  color: #1e1e1e;
  background: #f9f9f9;
  resize: none;
  max-height: 100px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.cb-input:focus {
  border-color: #1e1e1e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30,30,30,0.06);
}
.cb-input::placeholder { color: #c0c0c0; }
.cb-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #1e1e1e;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.cb-send:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 16px rgba(0,0,0,0.28);
}
.cb-send svg { width: 15px; height: 15px; color: #f5f5f5; }
.cb-send:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }

@media (max-width: 480px) {
  .cb-panel { right: 12px; bottom: 88px; width: calc(100vw - 24px); }
  .cb-fab { right: 16px; bottom: 20px; }
}
