.podops-ai-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.podops-ai-chat__toggle {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.05;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.podops-ai-chat__toggle:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.podops-ai-chat__toggle::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #10b981;
  border-radius: 50%;
  border: 3px solid #fff;
  animation: podops-ai-pulse 2s infinite;
}

@keyframes podops-ai-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}

.podops-ai-chat__panel {
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 420px;
  max-width: calc(100vw - 48px);
  max-height: 650px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.podops-ai-chat__panel:not([hidden]) {
  display: flex;
  flex-direction: column;
}

.podops-ai-chat__header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.podops-ai-chat__avatar {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  overflow: hidden;
}

.podops-ai-chat__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podops-ai-chat__header-copy h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.podops-ai-chat__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.95;
  margin-top: 2px;
}

.podops-ai-chat__status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: podops-ai-pulse 2s infinite;
}

.podops-ai-chat__messages {
  flex: 1;
  max-height: 420px;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.podops-ai-chat__suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #eef0f5;
  scrollbar-width: thin;
}

.podops-ai-chat__suggestion {
  flex: 0 0 auto;
  border: 1px solid rgba(102, 126, 234, 0.24);
  border-radius: 999px;
  background: #f6f3ff;
  color: #5145a6;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.podops-ai-chat__suggestion:hover {
  background: #ece7ff;
  transform: translateY(-1px);
}

.podops-ai-chat__message {
  border-radius: 18px;
  padding: 12px 14px;
  line-height: 1.45;
  max-width: 86%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  white-space: pre-line;
}

.podops-ai-chat__message--assistant {
  align-self: flex-start;
  background: #fff;
  color: #1f2937;
}

.podops-ai-chat__message--visitor {
  align-self: flex-end;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}

.podops-ai-chat__link {
  color: #5145a6;
  font-weight: 800;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.podops-ai-chat__message--visitor .podops-ai-chat__link {
  color: #fff;
}

.podops-ai-chat__form {
  display: flex;
  gap: 10px;
  padding: 16px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.podops-ai-chat__form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 22px;
  padding: 12px 16px;
  font-size: 14px;
}

.podops-ai-chat__form input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.14);
}

.podops-ai-chat__form button {
  border: 0;
  border-radius: 22px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-weight: 700;
  padding: 0 18px;
  cursor: pointer;
}

@media (max-width: 430px) {
  .podops-ai-chat {
    right: 16px;
    bottom: 16px;
  }

  .podops-ai-chat__panel {
    right: 12px;
    bottom: 92px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .podops-ai-chat__messages {
    max-height: 56vh;
  }

  .podops-ai-chat__suggestions {
    padding: 10px 12px;
  }
}
