/* === BARBERSHOP CHATBOT UI — matches SetItRight dark theme === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d1a;
  --bg-alt: #13132a;
  --bg-card: #1a1a33;
  --fg: #ffffff;
  --fg-muted: #8a8aaa;
  --accent: #00d47a;
  --accent-dim: rgba(0, 212, 122, 0.12);
  --accent-border: rgba(0, 212, 122, 0.3);
  --border: rgba(255,255,255,0.08);
  --chat-bg: #111126;
  --chat-ai-bg: #0f2e1e;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === HEADER === */
.barber-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.barber-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.barber-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.barber-logo-text { font-size: 1.1rem; font-weight: 700; }
.barber-logo-tagline { font-size: 0.7rem; color: var(--fg-muted); font-family: var(--font-mono); }

.back-link {
  color: var(--fg-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

/* === HERO BANNER === */
.barber-hero {
  background: var(--accent-dim);
  border-bottom: 1px solid var(--accent-border);
  padding: 2.5rem 2rem;
  text-align: center;
}

.barber-hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.barber-hero h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 0.4rem; }
.barber-hero p { color: var(--fg-muted); max-width: 50ch; margin: 0 auto 1.5rem; }

.service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.service-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* === CHAT CONTAINER === */
.chat-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.chat-messages {
  background: var(--chat-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  min-height: 400px;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* === MESSAGES === */
.msg {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #000;
  border-bottom-right-radius: 4px;
}

.msg-assistant {
  align-self: flex-start;
  background: var(--chat-ai-bg);
  border: 1px solid var(--accent-border);
  border-bottom-left-radius: 4px;
  color: var(--fg);
}

.msg-system {
  align-self: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-align: center;
  max-width: 90%;
}

.msg-time {
  font-size: 0.65rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
  font-family: var(--font-mono);
}

/* === INPUT === */
.chat-input-row {
  display: flex;
  gap: 0.75rem;
}

.chat-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--fg-muted); }

.chat-send-btn {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-send-btn:hover { opacity: 0.85; }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* === BOOKING CARD === */
.booking-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 0.5rem;
}

.booking-card h4 {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.booking-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.booking-detail-label { color: var(--fg-muted); font-size: 0.75rem; font-family: var(--font-mono); }
.booking-detail-value { color: var(--fg); }

/* === TYPING INDICATOR === */
.typing {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--chat-ai-bg);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* === BOOKING CONFIRMATION MODAL === */
.booking-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.booking-modal.open { display: flex; }

.booking-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
}

.booking-modal-check {
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}

.booking-modal h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.booking-modal p { color: var(--fg-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.booking-modal-close {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.5rem;
  font-weight: 700;
  cursor: pointer;
}