/* ============================================================
   Smartize AI Chatbot — chatbot.css
   ============================================================ */

/* ── Variáveis ── */
:root {
  --smc-primary:    #1a1a2e;
  --smc-primary-lt: rgba(26,26,46,0.08);
  --smc-radius:     14px;
  --smc-shadow:     0 8px 40px rgba(0,0,0,0.13);
}

/* ── Launcher Button ── */
#smartize-chat-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--smc-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--smc-shadow);
  z-index: 99999;
  transition: transform .22s ease, box-shadow .22s ease;
  border: none;
  outline: none;
}
#smartize-chat-launcher:hover   { transform: scale(1.07); }
#smartize-chat-launcher:focus-visible {
  outline: 3px solid rgba(26,26,46,.45);
  outline-offset: 3px;
}
#smartize-chat-launcher svg {
  width: 27px;
  height: 27px;
  stroke: #fff;
  display: block;
}

#smartize-chat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid #fff;
}
#smartize-chat-badge.smc-hidden { display: none; }

/* ── Chat Window ── */
#smartize-chat-window {
  position: fixed;
  bottom: 106px;
  right: 28px;
  width: 385px;
  max-height: 630px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--smc-radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  box-shadow: var(--smc-shadow);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  transition: opacity .2s ease, transform .2s ease;
  transform-origin: bottom right;
}
#smartize-chat-window.smc-hidden {
  opacity: 0;
  transform: scale(0.93) translateY(8px);
  pointer-events: none;
}

/* ── Header ── */
.smc-header {
  background: var(--smc-primary);
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.smc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
}
.smc-header-info { flex: 1; min-width: 0; }
.smc-name  { font-size: 14px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smc-status { font-size: 12px; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.smc-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
.smc-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  transition: color .15s;
  flex-shrink: 0;
}
.smc-close:hover { color: #fff; }

/* ── Messages Area ── */
#smc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  max-height: 420px;
  scroll-behavior: smooth;
}
#smc-messages::-webkit-scrollbar { width: 4px; }
#smc-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* ── Message Rows ── */
.smc-msg { display: flex; gap: 8px; align-items: flex-end; }
.smc-msg.smc-user { flex-direction: row-reverse; }

.smc-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--smc-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
}

.smc-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  background: #f2f2f5;
  color: #1a1a1a;
  word-break: break-word;
}
.smc-msg.smc-user .smc-bubble {
  background: var(--smc-primary);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.smc-msg.smc-bot  .smc-bubble { border-radius: 16px 16px 16px 4px; }

/* ── Typing ── */
.smc-typing { display: flex; gap: 4px; align-items: center; padding: 11px 14px; }
.smc-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #aaa;
  animation: smc-bounce 1.2s infinite;
}
.smc-typing span:nth-child(2) { animation-delay: .2s; }
.smc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes smc-bounce {
  0%,60%,100% { transform: translateY(0); }
  30%          { transform: translateY(-6px); }
}

/* ── Quick Reply Buttons ── */
.smc-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.smc-quick-btn {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #d0d0d8;
  color: #333;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  line-height: 1.4;
}
.smc-quick-btn:hover { background: #f5f5f8; border-color: var(--smc-primary); }

/* ── Booking Card ── */
.smc-booking-card {
  background: #f8f8fb;
  border: 1px solid #e0e0ea;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 6px;
}
.smc-booking-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: #1a1a2e; }
.smc-booking-slots { display: flex; flex-direction: column; gap: 7px; }
.smc-slot-btn {
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 13px;
  background: #fff;
  border: 1px solid #d8d8e8;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #1a1a1a;
  transition: border-color .15s, background .15s;
}
.smc-slot-btn:hover { border-color: var(--smc-primary); background: #f0f0f8; }

/* ── Lead Form ── */
.smc-lead-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.smc-lead-form input {
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 13px;
  border: 1px solid #d8d8e8;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.smc-lead-form input:focus { border-color: var(--smc-primary); }
.smc-lead-form-submit {
  padding: 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  background: var(--smc-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  font-family: inherit;
}
.smc-lead-form-submit:hover    { opacity: .87; }
.smc-lead-form-submit:disabled { opacity: .45; cursor: wait; }

/* ── Success Card ── */
.smc-success-card {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #1b5e20;
  margin-top: 6px;
  line-height: 1.6;
}

/* ── Input Area ── */
.smc-input-area {
  padding: 11px 14px;
  border-top: 1px solid #ebebf0;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  flex-shrink: 0;
}
#smc-input {
  flex: 1;
  padding: 9px 13px;
  border-radius: 22px;
  font-size: 13.5px;
  border: 1px solid #d8d8e8;
  background: #f5f5f8;
  color: #1a1a1a;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
#smc-input:focus { border-color: var(--smc-primary); background: #fff; }
#smc-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--smc-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .15s, transform .1s;
}
#smc-send:hover   { opacity: .82; }
#smc-send:active  { transform: scale(.95); }
#smc-send:disabled { opacity: .38; cursor: not-allowed; }

/* ── Footer ── */
.smc-powered {
  text-align: center;
  font-size: 11px;
  color: #aaa;
  padding: 5px 0 9px;
  background: #fff;
  flex-shrink: 0;
}
.smc-powered a { color: #aaa; text-decoration: none; }
.smc-powered a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 440px) {
  #smartize-chat-window  { width: calc(100vw - 20px); right: 10px; bottom: 92px; }
  #smartize-chat-launcher { right: 16px; bottom: 20px; }
}
