/* ============================================================
   SAINTE-ANGÈLE CHATBOT — STYLES
   Safe to edit colors/fonts below to match your site's branding.
   ============================================================ */

#sa-chatbot-root {
  --sa-primary: #7a1f2b;      /* main brand color (deep church red) */
  --sa-primary-dark: #5e1620;
  --sa-bg: #ffffff;
  --sa-bot-bubble: #f2ede9;
  --sa-text: #2b2321;
  --sa-radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
}

#sa-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--sa-primary);
  color: white;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.2s ease;
}
#sa-chat-toggle:hover { transform: scale(1.06); background: var(--sa-primary-dark); }

.sa-chat-icon-close { display: none; }
#sa-chat-toggle.sa-open .sa-chat-icon-open { display: none; }
#sa-chat-toggle.sa-open .sa-chat-icon-close { display: inline; }

#sa-chat-window {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 140px);
  background: var(--sa-bg);
  border-radius: var(--sa-radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
#sa-chat-window.sa-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92) translateY(8px);
}

.sa-chat-header {
  background: var(--sa-primary);
  color: white;
  padding: 16px 18px;
}
.sa-chat-header-title { font-weight: 700; font-size: 16px; }
.sa-chat-header-subtitle { font-size: 12px; opacity: 0.85; margin-top: 2px; }

.sa-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--sa-bg);
}

.sa-msg { display: flex; }
.sa-msg-bot { justify-content: flex-start; }
.sa-msg-user { justify-content: flex-end; }

.sa-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
  white-space: pre-wrap;
  color: var(--sa-text);
}
.sa-msg-bot .sa-bubble {
  background: var(--sa-bot-bubble);
  border-bottom-left-radius: 4px;
}
.sa-msg-user .sa-bubble {
  background: var(--sa-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.sa-typing .sa-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 13px 15px;
}
.sa-typing .sa-bubble span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9a8f8a;
  display: inline-block;
  animation: sa-bounce 1.2s infinite ease-in-out;
}
.sa-typing .sa-bubble span:nth-child(2) { animation-delay: 0.15s; }
.sa-typing .sa-bubble span:nth-child(3) { animation-delay: 0.3s; }
@keyframes sa-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.sa-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
}
.sa-suggestion-chip {
  border: 1px solid var(--sa-primary);
  color: var(--sa-primary);
  background: white;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sa-suggestion-chip:hover { background: var(--sa-primary); color: white; }

.sa-chat-form {
  display: flex;
  border-top: 1px solid #eee;
  padding: 10px;
  gap: 8px;
}
.sa-chat-form input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  outline: none;
}
.sa-chat-form input:focus { border-color: var(--sa-primary); }
.sa-chat-form button {
  background: var(--sa-primary);
  color: white;
  border: none;
  border-radius: 10px;
  width: 40px;
  font-size: 15px;
  cursor: pointer;
}
.sa-chat-form button:hover { background: var(--sa-primary-dark); }

@media (max-width: 420px) {
  #sa-chat-window { width: calc(100vw - 32px); right: -4px; }
}
