.chatbot-widget {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
}

.chatbot-toggle {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #5d4037;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.chatbot-panel {
  width: min(92vw, 360px);
  height: 480px;
  margin-top: 12px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease-out;
}

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

.chatbot-header {
  padding: 12px 14px;
  color: #fff;
  background: #3e2723;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: #f7f1ec;
}

.chatbot-row {
  margin-bottom: 8px;
  display: flex;
  animation: messageSlideIn 0.3s ease-out forwards;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatbot-row.user {
  justify-content: flex-end;
}

.chatbot-row.bot {
  flex-direction: column;
  align-items: flex-start;
}

.chatbot-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chatbot-row.user .chatbot-bubble {
  background: linear-gradient(135deg, #5d4037, #4e342e);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chatbot-row.bot .chatbot-bubble {
  background: #fff;
  border: 1px solid #eaeaea;
  color: #2c2c2c;
  border-bottom-left-radius: 4px;
}

/* Typing Indicator */
.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background-color: #a0a0a0;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

.chatbot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fff;
}

.chatbot-quick {
  padding: 8px 10px 2px;
  border-top: 1px solid #eee;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chatbot-chip {
  border: 1px solid #d7ccc8;
  background: #fffaf6;
  color: #4e342e;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatbot-chip:hover {
  background: #fbe9e3;
  border-color: #bcaaa4;
  transform: translateY(-1px);
}

.chatbot-chip:active {
  transform: translateY(0);
}

.chatbot-menu-block {
  width: 100%;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #eadfd8;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.chatbot-menu-title {
  font-size: 13px;
  color: #6d4c41;
  font-weight: 700;
  margin-bottom: 8px;
}

.chatbot-menu-list {
  display: grid;
  gap: 8px;
}

.chatbot-menu-item {
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  transition: border-color 0.2s ease;
}

.chatbot-menu-item:hover {
  border-color: #d7ccc8;
}

.chatbot-menu-media {
  width: 100%;
  height: 92px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3ece8;
  margin-bottom: 8px;
}

.chatbot-menu-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chatbot-menu-item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.chatbot-menu-name {
  font-weight: 700;
  color: #3e2723;
}

.chatbot-menu-price {
  color: #2e7d32;
  white-space: nowrap;
  font-weight: 700;
}

.chatbot-menu-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}

.chatbot-menu-actions {
  display: flex;
  gap: 8px;
}

.chatbot-mini-btn {
  border: 1px solid #d7ccc8;
  background: #fff;
  color: #4e342e;
  border-radius: 8px;
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
  flex: 1;
  transition: all 0.2s ease;
}

.chatbot-mini-btn:hover {
  background: #f8f1ed;
}

.chatbot-mini-btn:active {
  transform: scale(0.97);
}

.chatbot-mini-btn.primary {
  border-color: #5d4037;
  background: #5d4037;
  color: #fff;
}

.chatbot-mini-btn.primary:hover {
  background: #4e342e;
}