/* ===== SAVIN AI CHAT WIDGET ===== */
#savinToggleBtn {
  position: fixed; bottom: 28px; right: 28px; z-index: 99999;
  width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(135deg, #d4a017, #b8860b);
  border: none; cursor: pointer; font-size: 26px;
  box-shadow: 0 6px 24px rgba(184,134,11,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
#savinToggleBtn:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(184,134,11,0.55); }

#savinChatWindow {
  display: none; position: fixed;
  bottom: 104px; right: 28px; z-index: 99998;
  width: 380px; height: 560px;
  background: #fffdf8; border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 16px 56px rgba(0,0,0,0.18);
  flex-direction: column; overflow: hidden;
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  animation: savinPopIn 0.3s ease;
}
@keyframes savinPopIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.savin-chat-header {
  background: linear-gradient(135deg, #1a3a6b, #b8860b);
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.savin-chat-header-left { display: flex; align-items: center; gap: 10px; }
.savin-header-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; font-size: 18px;
}
.savin-header-name { color: white; font-weight: 600; font-size: 15px; }
.savin-header-sub { color: rgba(255,255,255,0.75); font-size: 11px; }
.savin-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  animation: savinPulse 2s infinite;
}
@keyframes savinPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

/* Chat body */
#savinChatBody {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  background: #f5f0e8;
  scrollbar-width: thin;
}
#savinChatBody::-webkit-scrollbar { width: 4px; }
#savinChatBody::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

/* Messages */
.savin-msg-row { display: flex; gap: 8px; animation: savinMsgIn 0.25s ease; }
@keyframes savinMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.savin-user { flex-direction: row-reverse; }
.savin-msg-icon {
  width: 30px; height: 30px; border-radius: 8px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; margin-top: 2px;
}
.savin-bot .savin-msg-icon { background: linear-gradient(135deg, #b8860b, #1a3a6b); color: white; }
.savin-user .savin-msg-icon { background: #e8e0d0; color: #7a6a4a; font-size: 11px; }
.savin-msg-content { max-width: 78%; display: flex; flex-direction: column; gap: 3px; }
.savin-user .savin-msg-content { align-items: flex-end; }
.savin-bubble {
  padding: 10px 14px; border-radius: 14px;
  font-size: 13px; line-height: 1.55;
}
.savin-bot .savin-bubble {
  background: #1a3a6b; color: #e8f0ff;
  border-bottom-left-radius: 3px;
  box-shadow: 0 3px 12px rgba(26,58,107,0.2);
}
.savin-user .savin-bubble {
  background: #b8860b; color: white;
  border-bottom-right-radius: 3px;
  box-shadow: 0 3px 12px rgba(184,134,11,0.25);
}
.savin-msg-time { font-size: 10px; color: #9a8a6a; padding: 0 3px; }

/* Typing */
.savin-typing-bubble {
  padding: 12px 16px; background: #1a3a6b;
  border-radius: 14px; border-bottom-left-radius: 3px;
  display: flex; gap: 5px; align-items: center;
}
.savin-t-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(232,240,255,0.5);
  animation: savinTdot 1.2s infinite;
}
.savin-t-dot:nth-child(2) { animation-delay: 0.2s; }
.savin-t-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes savinTdot {
  0%,60%,100% { transform: scale(1); opacity: 0.5; }
  30% { transform: scale(1.35); opacity: 1; }
}

/* Quick actions */
.savin-quick-actions {
  padding: 10px 14px; border-top: 1px solid rgba(0,0,0,0.07);
  display: flex; gap: 6px; flex-wrap: wrap;
  background: #fffdf8;
}
.savin-qa-chip {
  padding: 5px 12px; border-radius: 16px; font-size: 11px;
  font-weight: 500; border: 1px solid rgba(184,134,11,0.3);
  background: rgba(184,134,11,0.06); color: #b8860b;
  cursor: pointer; transition: all 0.2s; user-select: none;
}
.savin-qa-chip:hover { background: #b8860b; color: white; border-color: #b8860b; }

/* Input */
.savin-input-area {
  padding: 12px 14px; border-top: 1px solid rgba(0,0,0,0.07);
  display: flex; gap: 8px; align-items: center;
  background: #fffdf8;
}
.savin-input-box {
  flex: 1; display: flex; align-items: center;
  background: #f0ebe0; border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 10px; padding: 0 12px;
  transition: border-color 0.2s;
}
.savin-input-box:focus-within { border-color: #b8860b; box-shadow: 0 0 0 3px rgba(184,134,11,0.1); }
.savin-input-box input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 13px; color: #1a1208; padding: 10px 0;
  caret-color: #b8860b;
}
.savin-input-box input::placeholder { color: #9a8a6a; }
.savin-send-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #d4a017, #b8860b);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(184,134,11,0.35);
}
.savin-send-btn:hover { transform: scale(1.07); }
.savin-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Footer */
.savin-chat-footer {
  padding: 7px; text-align: center;
  font-size: 10px; color: #9a8a6a;
  background: #f5f0e8; border-top: 1px solid rgba(0,0,0,0.06);
}

/* Mobile */
@media (max-width: 480px) {
  #savinChatWindow { width: calc(100vw - 24px); right: 12px; bottom: 90px; }
  #savinToggleBtn { right: 16px; bottom: 20px; }
}

/* Hero button hover */
.btn-outline-white:hover {
  background: rgba(184,134,11,0.6) !important;
  border-color: #d4a017 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184,134,11,0.4);
}