/* ===== CHATBOT WIDGET ===== */
#chatbot-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(26, 58, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
}
#chatbot-launcher:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(26, 58, 42, 0.45); }
#chatbot-launcher.open { background: var(--fg-muted); }

#chatbot-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  background: white;
  border-radius: 18px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
  z-index: 999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 560px;
}
#chatbot-window.open { display: flex; }

.cw-header {
  background: var(--green);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cw-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  flex-shrink: 0;
}
.cw-header-info { flex: 1; }
.cw-header-name { font-weight: 700; font-size: 0.95rem; color: white; }
.cw-header-status { font-size: 0.72rem; color: rgba(255,255,255,0.65); }
.cw-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  font-size: 1.2rem;
  padding: 4px;
}

.cw-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 260px;
}
.cw-msg { display: flex; align-items: flex-end; gap: 7px; font-size: 0.85rem; line-height: 1.5; }
.cw-msg.user { flex-direction: row-reverse; }
.cw-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cw-msg.user .cw-msg-avatar { background: var(--fg-muted); }
.cw-bubble {
  padding: 9px 13px;
  border-radius: 13px;
  max-width: 76%;
  word-break: break-word;
}
.cw-msg:not(.user) .cw-bubble {
  background: var(--bg-alt);
  color: var(--fg);
  border-bottom-left-radius: 4px;
}
.cw-msg.user .cw-bubble {
  background: var(--green);
  color: white;
  border-bottom-right-radius: 4px;
}
.cw-bubble.book {
  background: var(--amber-dim);
  color: #92400e;
  border: 1px solid var(--amber-light);
}
.cw-bubble.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.cw-typing {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.cw-typing-dots { display: flex; gap: 3px; }
.cw-typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-muted);
  animation: typing-bounce 1.2s infinite;
}
.cw-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.cw-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce { 0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)} }

.cw-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: white;
}
.cw-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg-alt);
  outline: none;
  resize: none;
}
.cw-input:focus { border-color: var(--green); background: white; }
.cw-send {
  background: var(--green);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  transition: background 0.2s;
}
.cw-send:hover { background: var(--green-mid); }
.cw-send:disabled { background: var(--border); cursor: not-allowed; }

/* Booking modal */
#booking-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1001;
  align-items: center;
  justify-content: center;
}
#booking-modal.open { display: flex; }
.bm-inner {
  background: white;
  border-radius: 18px;
  padding: 28px;
  width: 380px;
  max-width: calc(100vw - 48px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.bm-inner h3 { font-size: 1.1rem; color: var(--fg); margin-bottom: 6px; }
.bm-inner p { font-size: 0.83rem; color: var(--fg-muted); margin-bottom: 20px; }
.bm-field { margin-bottom: 14px; }
.bm-field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 5px; color: var(--fg); }
.bm-field input, .bm-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg-alt);
  outline: none;
}
.bm-field input:focus, .bm-field select:focus { border-color: var(--green); background: white; }
.bm-slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bm-slot {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  background: white;
  transition: all 0.15s;
}
.bm-slot:hover { border-color: var(--green); color: var(--green); }
.bm-slot.selected { background: var(--green); color: white; border-color: var(--green); }
.bm-actions { display: flex; gap: 10px; margin-top: 18px; }
.bm-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.bm-actions button:hover { opacity: 0.88; }
.bm-cancel { background: var(--bg-alt); color: var(--fg-muted); }
.bm-confirm { background: var(--green); color: white; }
.bm-confirm:disabled { background: var(--border); color: var(--fg-muted); cursor: not-allowed; }

@media (max-width: 480px) {
  #chatbot-window { right: 12px; bottom: 80px; width: calc(100vw - 24px); }
  #chatbot-launcher { right: 16px; bottom: 16px; }
}