.chatbot-panel {
  position: fixed;
  right: 24px;
  bottom: 224px;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: 480px;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(4, 27, 71, 0.3), 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid rgba(4, 27, 71, 0.08);
  overflow: hidden;
  z-index: 901;
  animation: scaleIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.chatbot-header {
  background: var(--gradient-primary);
  color: #fff;
  padding: 16px 16px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.chatbot-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% -20%, rgba(214,31,58,0.55), transparent 60%);
  pointer-events: none;
}
.chatbot-header-info { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.chatbot-avatar {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chatbot-avatar-dot {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #2ECC71;
  border: 2px solid var(--color-primary);
}
.chatbot-header strong { display: block; font-size: 15px; }
.chatbot-header span { display: block; font-size: 11.5px; color: #9BE7B0; margin-top: 2px; font-weight: 600; }
.chatbot-close {
  background: rgba(255,255,255,0.14);
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
  position: relative;
  z-index: 1;
}
.chatbot-close:hover { background: rgba(255,255,255,0.26); }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, #F5F7FC 0%, #FFFFFF 100%);
}

.chatbot-msg {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  animation: chatBubbleIn 0.25s ease;
}
@keyframes chatBubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chatbot-msg.bot {
  align-self: flex-start;
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 3px 10px rgba(4,27,71,0.06);
}
.chatbot-msg.user {
  align-self: flex-end;
  background: var(--gradient-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(4,27,71,0.25);
}

.chatbot-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.chatbot-quick-replies button {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  background: rgba(4, 27, 71, 0.05);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.chatbot-quick-replies button:hover {
  background: var(--gradient-accent);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(214,31,58,0.3);
}

.chatbot-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--color-border);
  background: #fff;
}
.chatbot-input-row input {
  flex: 1;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}
.chatbot-input-row input:focus { outline: none; border-color: var(--color-accent); }
.chatbot-input-row button[type='submit'] {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(214,31,58,0.3);
  transition: transform 0.2s ease;
}
.chatbot-input-row button[type='submit']:hover { transform: scale(1.08); }

@media (max-width: 600px) {
  .chatbot-panel {
    right: 16px;
    bottom: 186px;
    width: calc(100vw - 32px);
    max-height: 70vh;
  }
}
