/* SSF BaatCheet Chatbot Widget */
.ssf-bc-root {
  --bc-accent: #00a651;
  --bc-accent-dark: #007a3d;
  --bc-blue: #2e3192;
  --bc-bg: #ffffff;
  --bc-surface: #f5f7fb;
  --bc-border: #e3e5f2;
  --bc-text: #1e2033;
  --bc-muted: #5a607a;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
}

.ssf-bc-root.ssf-bc-left {
  right: auto;
  left: 20px;
}

/* Launcher & Knock-Knock Teaser */
.ssf-bc-launcher-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-direction: row;
}

.ssf-bc-root.ssf-bc-left .ssf-bc-launcher-wrap {
  flex-direction: row-reverse;
}

.ssf-bc-teaser {
  position: relative;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  color: var(--bc-text);
  border: 1.5px solid rgba(46, 49, 146, 0.16);
  border-left: 4px solid var(--bc-accent);
  border-radius: 16px;
  padding: 11px 30px 11px 14px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(15, 18, 64, 0.18);
  cursor: pointer;
  animation: ssfBcPop 0.35s ease-out;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ssf-bc-teaser:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(15, 18, 64, 0.22);
}

.ssf-bc-teaser::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 14px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-right: 1.5px solid rgba(46, 49, 146, 0.16);
  border-bottom: 1.5px solid rgba(46, 49, 146, 0.16);
  transform: rotate(-45deg);
}

.ssf-bc-root.ssf-bc-left .ssf-bc-teaser::after {
  right: auto;
  left: -7px;
  transform: rotate(135deg);
}

.ssf-bc-teaser-kicker {
  color: var(--bc-blue);
  font-weight: 700;
}

.ssf-bc-teaser-close {
  position: absolute;
  top: 5px;
  right: 7px;
  background: rgba(15, 18, 64, 0.06);
  border: none;
  color: var(--bc-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ssf-bc-teaser-close:hover {
  background: rgba(15, 18, 64, 0.14);
  color: var(--bc-text);
}

.ssf-bc-launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #007a3d 0%, #00a651 55%, #1a1d5e 100%);
  color: #ffffff;
  border: 2px solid #f5b942;
  border-radius: 999px;
  padding: 5px 18px 5px 6px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 18, 64, 0.34), 0 4px 12px rgba(0, 166, 81, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ssf-bc-launcher:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 34px rgba(15, 18, 64, 0.42), 0 6px 16px rgba(0, 166, 81, 0.34);
  filter: brightness(1.04);
}

.ssf-bc-launcher-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.ssf-bc-launcher-avatar svg {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
}

.ssf-bc-launcher-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.ssf-bc-launcher-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
}

.ssf-bc-launcher-role {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 2px;
}

.ssf-bc-pulse-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.85);
  animation: ssfBcPulse 2.2s infinite;
}

@keyframes ssfBcPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(127, 224, 169, 0.8);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(127, 224, 169, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(127, 224, 169, 0);
  }
}

/* Chat Window */
.ssf-bc-window {
  display: none;
  flex-direction: column;
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 520px;
  max-height: calc(100vh - 90px);
  background: var(--bc-bg);
  border: 1px solid var(--bc-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(15, 18, 64, 0.2);
  margin-bottom: 12px;
}

.ssf-bc-window.is-open {
  display: flex;
  animation: ssfBcPop 0.25s ease-out;
}

.ssf-bc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--bc-accent), var(--bc-blue));
  color: #ffffff;
}

.ssf-bc-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ssf-bc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ssf-bc-avatar svg {
  width: 34px;
  height: 34px;
  display: block;
}

.ssf-bc-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.ssf-bc-subtitle {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

.ssf-bc-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ssf-bc-icon-btn {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ssf-bc-icon-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Messages */
.ssf-bc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--bc-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ssf-bc-msg {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  word-wrap: break-word;
}

.ssf-bc-msg-bot {
  align-self: flex-start;
  background: #ffffff;
  color: var(--bc-text);
  border: 1px solid var(--bc-border);
  border-left: 3px solid var(--bc-accent);
  border-bottom-left-radius: 4px;
  box-shadow: 0 3px 10px rgba(15, 18, 64, 0.05);
}

.ssf-bc-msg-bot p {
  margin: 0 0 8px 0;
}

.ssf-bc-msg-bot p:last-child {
  margin-bottom: 0;
}

.ssf-bc-msg-bot strong {
  color: #121533;
  font-weight: 700;
}

.ssf-bc-list {
  margin: 6px 0 8px 0;
  padding-left: 16px;
}

.ssf-bc-list:last-child {
  margin-bottom: 0;
}

.ssf-bc-list li {
  margin-bottom: 5px;
}

.ssf-bc-list li:last-child {
  margin-bottom: 0;
}

.ssf-bc-list li::marker {
  color: var(--bc-accent);
  font-weight: 700;
}

.ssf-bc-msg-user {
  align-self: flex-end;
  background: var(--bc-accent);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 166, 81, 0.22);
}

.ssf-bc-cta-row {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--bc-border);
}

.ssf-bc-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  background: var(--bc-blue);
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ssf-bc-cta:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.ssf-bc-suggestions-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--bc-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 2px 0 4px 2px;
}

/* Quick Chips */
.ssf-bc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.ssf-bc-chip {
  background: #ffffff;
  color: var(--bc-blue);
  border: 1px solid #cfd4ee;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ssf-bc-chip:hover {
  background: var(--bc-accent);
  color: #ffffff;
  border-color: var(--bc-accent);
}

/* Typing */
.ssf-bc-typing {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--bc-border);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--bc-muted);
}

/* Input Bar */
.ssf-bc-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid var(--bc-border);
}

.ssf-bc-input {
  flex: 1;
  border: 1px solid var(--bc-border);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
}

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

.ssf-bc-send {
  background: var(--bc-accent);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

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

@media (max-width: 480px) {
  .ssf-bc-root {
    bottom: 12px;
    right: 12px;
  }
  .ssf-bc-root.ssf-bc-left {
    left: 12px;
  }
  .ssf-bc-window {
    width: calc(100vw - 24px);
    height: 72vh;
  }
}
