/* ============================================================
   Fraud Support Chatbot — chatbot.css
   Location: wp-content/themes/your-theme/fraud-chatbot/chatbot.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Space+Grotesk:wght@500;700&display=swap');

/* ── LAUNCHER BUBBLE ─────────────────────────────────────── */
#fs-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, #00b09b, #00c853);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 28px rgba(0,176,155,.55);
  z-index: 99998;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
  animation: fs-pulse-ring 2.8s ease-out infinite;
}
#fs-launcher:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 36px rgba(0,176,155,.7);
}
@keyframes fs-pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(0,200,83,.55), 0 6px 28px rgba(0,176,155,.55); }
  70%  { box-shadow: 0 0 0 18px rgba(0,200,83,0),  0 6px 28px rgba(0,176,155,.55); }
  100% { box-shadow: 0 0 0 0   rgba(0,200,83,0),  0 6px 28px rgba(0,176,155,.55); }
}
#fs-launcher svg {
  width: 28px;
  height: 28px;
  fill: white;
  transition: opacity .2s;
}
#fs-launcher .icon-close { display: none; }
#fs-launcher.open .icon-chat  { display: none; }
#fs-launcher.open .icon-close { display: block; }

/* notification dot */
#fs-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: #ff3d3d;
  border-radius: 50%;
  border: 2px solid white;
  animation: fs-dot-bounce .6s ease alternate infinite;
}
@keyframes fs-dot-bounce { to { transform: scale(1.25); } }

/* ── CHAT WINDOW ─────────────────────────────────────────── */
#fs-chat {
  position: fixed;
  bottom: 104px;
  right: 28px;
  width: 380px;
  max-height: 580px;
  background: #f5f7fb;
  border-radius: 20px;
  box-shadow: 0 16px 60px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  transform: scale(.85) translateY(30px);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s;
  font-family: 'DM Sans', sans-serif;
}
#fs-chat.visible {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* header */
.fs-header {
  background: linear-gradient(135deg, #00b09b 0%, #00c853 100%);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.fs-header-avatar {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fs-header-avatar svg { width: 22px; height: 22px; fill: white; }
.fs-header-info { flex: 1; }
.fs-header-info h3 {
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
}
.fs-header-info span {
  color: rgba(255,255,255,.82);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.fs-online-dot {
  width: 7px;
  height: 7px;
  background: #b9f6ca;
  border-radius: 50%;
  animation: fs-dot-bounce .6s ease alternate infinite;
}
.fs-close-btn {
  background: rgba(255,255,255,.2);
  border: none;
  cursor: pointer;
  color: white;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background .2s;
}
.fs-close-btn:hover { background: rgba(255,255,255,.35); }

/* messages area */
.fs-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.fs-messages::-webkit-scrollbar { width: 4px; }
.fs-messages::-webkit-scrollbar-thumb { background: #c8cfd8; border-radius: 2px; }

/* bubbles */
.fs-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: fs-bubble-in .25s ease;
}
@keyframes fs-bubble-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fs-bubble.bot {
  background: white;
  color: #1e293b;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.fs-bubble.user {
  background: linear-gradient(135deg, #00b09b, #00c853);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  box-shadow: 0 2px 8px rgba(0,176,155,.3);
}

/* typing indicator */
.fs-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  background: white;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  animation: fs-bubble-in .25s ease;
}
.fs-typing span {
  width: 7px;
  height: 7px;
  background: #94a3b8;
  border-radius: 50%;
  animation: fs-typing-dot 1s ease infinite;
}
.fs-typing span:nth-child(2) { animation-delay: .15s; }
.fs-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes fs-typing-dot {
  0%,80%,100% { transform: scale(.8); opacity: .5; }
  40%         { transform: scale(1.2); opacity: 1; }
}

/* option buttons */
.fs-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 4px 0 0 2px;
  align-self: flex-start;
  max-width: 95%;
  animation: fs-bubble-in .3s ease;
}
.fs-opt-btn {
  background: white;
  border: 1.5px solid #00b09b;
  color: #00836e;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.fs-opt-btn:hover {
  background: linear-gradient(135deg, #00b09b, #00c853);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,176,155,.35);
}
.fs-opt-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
}

/* footer input */
.fs-footer {
  padding: 10px 12px;
  background: white;
  border-top: 1px solid #e8edf4;
  display: flex;
  flex-direction: column;  /* stack error + input row */
  gap: 0;
  flex-shrink: 0;
}

/* phone error message */
#fs-phone-error {
  display: none;
  font-size: 11px;
  font-weight: 600;
  color: #e53e3e;
  padding: 4px 16px 0;
}

/* input row inside footer */
.fs-footer-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fs-footer input {
  flex: 1;
  border: 1.5px solid #dce4ef;
  border-radius: 22px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  color: #1e293b;
  background: #f5f7fb;
  transition: border-color .2s;
}
.fs-footer input:focus  { border-color: #00b09b; background: white; }
.fs-footer input:disabled { opacity: .5; cursor: not-allowed; }
.fs-footer input.input-error { border-color: #e53e3e !important; }
.fs-send-btn {
  /* width: 40px;
  height: 40px; */
  background: linear-gradient(135deg, #00b09b, #00c853);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}
.fs-send-btn:hover  { transform: scale(1.08); box-shadow: 0 4px 14px rgba(0,176,155,.4); }
.fs-send-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.fs-send-btn svg { width: 18px; height: 18px; fill: white; }

/* mobile */
@media (max-width: 480px) {
  #fs-chat     { width: calc(100vw - 20px); right: 10px; bottom: 90px; border-radius: 16px; }
  #fs-launcher { right: 18px; bottom: 18px; }
}