/* === CHATBOT PAGE === */
body {
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
}

.nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}

.nav-inner {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.nav-tagline {
  font-family: 'Figtree', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-right {
  display: flex; align-items: center; gap: 16px;
}

/* Theme toggle */
.theme-toggle {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 6px 14px 6px 10px;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  font-family: 'Figtree', sans-serif; font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--text); }
.theme-toggle svg { width: 14px; height: 14px; }
[data-theme="dark"] .theme-toggle .icon-sun,
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon,
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.chat-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 48px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.chat-header {
  text-align: center;
  padding: 40px 0 28px;
}

.chat-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.025em;
}

.chat-header p {
  font-family: 'Figtree', sans-serif;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* === MESSAGE AREA === */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scroll-behavior: smooth;
}

.message {
  display: flex;
  gap: 10px;
  max-width: 82%;
  animation: messageIn 0.2s ease-out;
}

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

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.bot {
  align-self: flex-start;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Figtree', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.message.user .message-avatar {
  background: var(--accent);
  color: var(--bg);
}

.message.bot .message-avatar {
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  font-size: 0.6rem;
}

.message-content {
  padding: 10px 14px;
  border-radius: 16px;
  font-family: 'Figtree', sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
}

.message.user .message-content {
  background: var(--accent);
  color: var(--bg);
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(232,147,10,0.25);
}

.message.bot .message-content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Markdown rendered content */
.message-content strong,
.message-content b {
  font-weight: 600;
  color: inherit;
}

.message-content p {
  margin: 0 0 8px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content ul,
.message-content ol {
  margin: 6px 0;
  padding-left: 20px;
}

.message-content li {
  margin: 4px 0;
}

/* === TYPING INDICATOR === */
.message-content.typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  min-width: 60px;
}

.message-content.typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.message-content.typing .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.message-content.typing .dot:nth-child(3) {
  animation-delay: 0.4s;
}

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

/* === INPUT AREA === */
.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  bottom: 0;
}

.chat-input {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 18px;
  color: var(--text);
  font-family: 'Figtree', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.chat-input::placeholder {
  color: var(--text-dim);
}

.send-button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 14px;
  padding: 13px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Figtree', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.send-button:hover {
  opacity: 0.9;
}

.send-button:active {
  transform: scale(0.97);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === BOOKING FORM === */
.booking-message {
  border-radius: 16px;
}

.booking-form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: 'Figtree', sans-serif;
}

.booking-input {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: 'Figtree', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.booking-input:focus {
  border-color: var(--accent);
}

.booking-submit {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Figtree', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.booking-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.booking-submit:active:not(:disabled) {
  transform: scale(0.98);
}

/* === TIME SLOTS === */
.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.time-slot {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-family: 'Figtree', sans-serif;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.time-slot:hover {
  border-color: var(--accent);
}

.time-slot.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

/* === CONFIRMATION MESSAGE === */
.confirmation-message {
  background: rgba(52, 211, 153, 0.1) !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
  padding: 16px 20px !important;
  border-radius: 16px !important;
  border-bottom-left-radius: 4px !important;
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
  .chat-container {
    padding: 0 16px 32px;
  }

  .chat-header {
    padding: 28px 0 20px;
  }

  .chat-header h1 {
    font-size: 1.45rem;
  }

  .message {
    max-width: 88%;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.6rem;
  }

  .message-content {
    padding: 9px 13px;
    font-size: 0.9rem;
  }

  .chat-input-area {
    gap: 8px;
  }
}
