/* =====================================================
   booking.css — AI Booking Agent chat widget styles
   ===================================================== */

/* Chat bubble trigger */
#booking-bubble {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--lime);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(200, 243, 70, 0.35), 0 0 0 2px var(--lime-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#booking-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 32px rgba(200, 243, 70, 0.5), 0 0 0 3px var(--lime-border);
}
#booking-bubble svg { width: 28px; height: 28px; }

/* Widget panel */
#booking-panel {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 9998;
  width: 380px;
  max-height: 600px;
  background: var(--bg-card);
  border: 1px solid var(--lime-border);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px var(--lime-border);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#booking-panel.open { display: flex; }

/* Panel header */
.bp-header {
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.bp-header-info { display: flex; flex-direction: column; gap: 0.2rem; }
.bp-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bp-title .badge {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  background: var(--lime-dim);
  border: 1px solid var(--lime-border);
  border-radius: 100px;
  color: var(--lime);
}
.bp-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.bp-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 0.4rem;
  border-radius: 6px;
  transition: background 0.15s;
  display: flex;
}
.bp-close:hover { background: var(--border); color: var(--text); }

/* Chat messages area */
.bp-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  scroll-behavior: smooth;
}
.bp-messages::-webkit-scrollbar { width: 4px; }
.bp-messages::-webkit-scrollbar-track { background: transparent; }
.bp-messages::-webkit-scrollbar-thumb { background: var(--lime-border); border-radius: 2px; }

.bp-msg {
  display: flex;
  gap: 0.6rem;
  animation: msg-in 0.3s ease;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bp-msg.bot { align-items: flex-start; }
.bp-msg.user { align-items: flex-end; flex-direction: row-reverse; }

.bp-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--lime-dim);
  border: 1px solid var(--lime-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
}
.bp-avatar svg { width: 16px; height: 16px; color: var(--lime); }

.bp-bubble {
  max-width: 76%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
}
.bp-msg.bot .bp-bubble {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bp-msg.user .bp-bubble {
  background: var(--lime-dim);
  border: 1px solid var(--lime-border);
  color: var(--lime);
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.bp-typing {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  padding: 0.4rem 0;
}
.bp-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.bp-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.bp-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* Calendar / slots panel */
.bp-slots {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 260px;
  overflow-y: auto;
}
.bp-slots.visible { display: flex; }
.bp-slots-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lime);
  font-weight: 600;
}
.slot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.slot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.slot-card:hover { border-color: var(--lime-border); background: var(--lime-dim); }
.slot-card.selected { border-color: var(--lime); background: var(--lime-dim); }
.slot-date {
  font-size: 0.72rem;
  color: var(--lime);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.slot-time { font-size: 0.88rem; color: var(--text); font-weight: 500; }
.slot-type { font-size: 0.68rem; color: var(--text-muted); }

/* Booking confirmation */
.bp-book-form {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  display: none;
  flex-direction: column;
  gap: 0.6rem;
}
.bp-book-form.visible { display: flex; }
.bp-book-title {
  font-size: 0.8rem;
  color: var(--lime);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.bp-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text);
  font-family: var(--sans);
  outline: none;
  transition: border-color 0.15s;
}
.bp-input:focus { border-color: var(--lime-border); }
.bp-input::placeholder { color: var(--text-muted); }
.bp-btn-row { display: flex; gap: 0.5rem; }
.bp-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.bp-btn-primary {
  background: var(--lime);
  color: var(--bg);
}
.bp-btn-primary:hover { background: #d4f55f; transform: translateY(-1px); }
.bp-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.bp-btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.bp-btn-secondary:hover { border-color: var(--lime-border); color: var(--text); }

/* Booking confirmation display */
.bp-confirmed {
  border-top: 1px solid var(--lime-border);
  padding: 1rem 1.25rem;
  background: var(--lime-dim);
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}
.bp-confirmed.visible { display: flex; }
.bp-confirmed-icon { font-size: 2rem; }
.bp-confirmed-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--lime);
}
.bp-confirmed-detail { font-size: 0.8rem; color: var(--text-dim); }

/* Input area */
.bp-input-area {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  background: var(--bg-alt);
  flex-shrink: 0;
}
.bp-text-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
  font-family: var(--sans);
  outline: none;
  transition: border-color 0.15s;
}
.bp-text-input:focus { border-color: var(--lime-border); }
.bp-text-input::placeholder { color: var(--text-muted); }
.bp-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--lime);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s;
}
.bp-send:hover { transform: scale(1.08); }
.bp-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.bp-send svg { width: 16px; height: 16px; color: var(--bg); }

/* Responsive */
@media (max-width: 480px) {
  #booking-panel { right: 1rem; bottom: 5rem; width: calc(100vw - 2rem); max-height: 70vh; }
  #booking-bubble { bottom: 1.5rem; right: 1.5rem; width: 56px; height: 56px; }
}