.sfbc-ai {
  position: fixed !important;
  bottom: 20px;
  right: 20px;
  z-index: 999999 !important;
}

/* FAB */
.sfbc-ai-fab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0b2c4d;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.sfbc-ai-fab-dot {
  width: 10px;
  height: 10px;
  background: #f4c542;
  border-radius: 50%;
}

/* PANEL */
.sfbc-ai-panel {
  position: fixed !important;
  bottom: 90px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.sfbc-ai-panel.open {
  display: flex;
}

/* HEADER */
.sfbc-ai-header {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: #0b2c4d;
  color: #fff;
}

.sfbc-ai-badge {
  background: #f4c542;
  color: #000;
  padding: 4px 6px;
  border-radius: 6px;
  font-weight: 700;
}

/* MESSAGES */
.sfbc-ai-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f7f9fc;
}

.sfbc-ai-msg {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}

.sfbc-ai-msg.user {
  background: #0b2c4d;
  color: #fff;
  margin-left: auto;
}

.sfbc-ai-msg.bot {
  background: #fff;
  border: 1px solid #ddd;
}

/* INPUT */
.sfbc-ai-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #ddd;
}

.sfbc-ai-text {
  flex: 1;
  padding: 8px;
}

.sfbc-ai-send {
  background: #0b2c4d;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
}

/* MOBILE */
@media (max-width: 768px) {
  .sfbc-ai {
    right: 12px !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px) !important;
  }

  .sfbc-ai-panel {
    width: calc(100vw - 20px);
    height: 70vh;              /* ⬅️ clave */
    max-height: 70vh;
    right: 10px;
    bottom: 70px;
    border-radius: 12px;
  }

  .sfbc-ai-messages {
    font-size: 14px;
  }

  .sfbc-ai-fab {
    padding: 10px 14px;
    font-size: 14px;
  }

  .sfbc-ai-fab-text {
    display: none; /* solo icono en mobile */
  }
}
