.chatbot-trigger {
  position: fixed;
  right: 20px;
  bottom: 28px;
  z-index: 1200;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 30% 25%, #f25d6f 0%, #d72638 45%, #a61726 100%);
  color: #fff;
  box-shadow: 0 16px 34px rgba(215, 38, 56, 0.42);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chatbot-trigger:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 20px 44px rgba(215, 38, 56, 0.5);
  filter: saturate(1.06);
}

.chatbot-trigger svg {
  width: 25px;
  height: 25px;
  margin: 0;
}
.chatbot-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff7f8;
  color: #a61221;
  font-size: 0.7rem;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.chatbot-badge.visible { display: inline-flex; }

.chatbot-panel {
  position: fixed;
  right: 20px;
  bottom: 98px;
  width: min(380px, calc(100vw - 32px));
  height: 540px;
  background: linear-gradient(180deg, #12121a 0%, #0d0d14 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
  transform: translateY(14px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.chatbot-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.chatbot-header {
  padding: 13px 14px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
    linear-gradient(120deg, #d72638, #b71c2a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.chatbot-header strong {
  font-family: Outfit, sans-serif;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  display: block;
}

.chatbot-header small {
  opacity: 0.92;
  font-size: 0.74rem;
  letter-spacing: 0.015em;
}
.chatbot-header-actions { display: flex; gap: 6px; align-items: center; }
.chatbot-clear {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.chatbot-close {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.chatbot-clear:hover,
.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.chatbot-messages {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
  background: linear-gradient(180deg, #101019 0%, #0b0b12 100%);
}
.chatbot-messages::-webkit-scrollbar { width: 7px; }
.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.chatbot-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 9px;
  line-height: 1.48;
  font-size: 0.85rem;
  white-space: pre-line;
}

.chatbot-msg.bot {
  background: #191924;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ececf4;
  border-top-left-radius: 8px;
}

.chatbot-msg.user {
  background: linear-gradient(140deg, rgba(215, 38, 56, 0.22), rgba(183, 28, 42, 0.26));
  border: 1px solid rgba(215, 38, 56, 0.45);
  color: #fff;
  margin-left: auto;
  border-top-right-radius: 8px;
}

.chatbot-typing {
  max-width: 78px;
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 10px;
  background: #191924;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  gap: 4px;
}
.chatbot-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9c9d6;
  animation: chatBlink 1.2s infinite;
}
.chatbot-typing span:nth-child(2) { animation-delay: 0.15s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatBlink {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-1px); }
}

.chatbot-quick {
  padding: 0 12px 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: #0b0b12;
}

.chatbot-quick button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #dbdbe8;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatbot-quick button:hover {
  border-color: rgba(215, 38, 56, 0.55);
  background: rgba(215, 38, 56, 0.12);
  color: #fff;
}

.chatbot-actions {
  padding: 0 12px 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: #0b0b12;
}
.chatbot-action-btn {
  border: 1px solid rgba(215, 38, 56, 0.42);
  background: rgba(215, 38, 56, 0.14);
  color: #ffe2e6;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chatbot-action-btn:hover {
  background: rgba(215, 38, 56, 0.24);
  border-color: rgba(215, 38, 56, 0.6);
  color: #fff;
}

.chatbot-form {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 8px;
  background: #11111a;
}

.chatbot-input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #171722;
  color: #fff;
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 0.84rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-input:focus {
  outline: none;
  border-color: rgba(215, 38, 56, 0.8);
  box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.16);
}

.chatbot-send {
  border: none;
  border-radius: 10px;
  padding: 0 13px;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, #d72638, #b71c2a);
  color: #fff;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chatbot-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(215, 38, 56, 0.35);
}

@media (max-width: 768px) {
  .chatbot-trigger {
    bottom: 18px;
    right: 14px;
  }

  .chatbot-panel {
    right: 8px;
    bottom: 86px;
    height: min(500px, 70vh);
    width: calc(100vw - 16px);
    border-radius: 16px;
  }
}
