:root {
  --dd-chat-gold: #c8a46b;
  --dd-chat-gold-dark: #9b7138;
  --dd-chat-ink: #17110b;
  --dd-chat-muted: #786d61;
  --dd-chat-cream: #fff8ee;
  --dd-chat-border: rgba(200, 164, 107, 0.26);
  --dd-chat-shadow: 0 24px 70px rgba(23, 17, 11, 0.24);
}

.dd-faq-chatbot,
.dd-faq-chatbot * {
  box-sizing: border-box;
}

.dd-faq-chatbot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  font-family: inherit;
}

.dd-faq-chatbot__launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 154px;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  padding: 0 21px;
  color: #fff;
  background: linear-gradient(135deg, var(--dd-chat-ink), var(--dd-chat-gold-dark));
  box-shadow: 0 14px 35px rgba(23, 17, 11, 0.32);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.dd-faq-chatbot__launcher:hover,
.dd-faq-chatbot__launcher:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(23, 17, 11, 0.38);
}

.dd-faq-chatbot__launcher i {
  font-size: 20px;
}

.dd-faq-chatbot__launcher-text {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.dd-faq-chatbot__pulse {
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(200, 164, 107, 0.45);
  animation: ddChatPulse 1.9s ease-out infinite;
  pointer-events: none;
}

@keyframes ddChatPulse {
  0% { transform: scale(0.94); opacity: 0.9; }
  100% { transform: scale(1.16); opacity: 0; }
}

.dd-faq-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(380px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 112px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--dd-chat-border);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--dd-chat-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.96);
  transform-origin: right bottom;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.dd-faq-chatbot.is-open .dd-faq-chatbot__launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.92);
}

.dd-faq-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(135deg, #17110b, #5b3616 52%, #c8a46b);
}

.dd-faq-chatbot__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dd-faq-chatbot__avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}

.dd-faq-chatbot__brand h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.dd-faq-chatbot__brand p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.2;
}

.dd-faq-chatbot__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.dd-faq-chatbot__close:hover,
.dd-faq-chatbot__close:focus-visible {
  background: rgba(255, 255, 255, 0.25);
}

.dd-faq-chatbot__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 248, 238, 0.95), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at top right, rgba(200, 164, 107, 0.18), transparent 35%);
  scrollbar-width: thin;
}

.dd-faq-chatbot__message {
  display: flex;
  margin: 0 0 12px;
  animation: ddChatPop 0.18s ease both;
}

@keyframes ddChatPop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dd-faq-chatbot__message--bot {
  justify-content: flex-start;
}

.dd-faq-chatbot__message--user {
  justify-content: flex-end;
}

.dd-faq-chatbot__bubble {
  max-width: 88%;
  padding: 12px 13px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.dd-faq-chatbot__message--bot .dd-faq-chatbot__bubble {
  color: var(--dd-chat-ink);
  background: #fff;
  border: 1px solid rgba(200, 164, 107, 0.18);
  border-bottom-left-radius: 7px;
  box-shadow: 0 9px 24px rgba(23, 17, 11, 0.08);
}

.dd-faq-chatbot__message--user .dd-faq-chatbot__bubble {
  color: #fff;
  background: linear-gradient(135deg, var(--dd-chat-gold-dark), var(--dd-chat-gold));
  border-bottom-right-radius: 7px;
  box-shadow: 0 9px 24px rgba(155, 113, 56, 0.24);
}

.dd-faq-chatbot__bubble strong {
  font-weight: 900;
}

.dd-faq-chatbot__bubble a {
  color: var(--dd-chat-gold-dark);
  font-weight: 800;
  text-decoration: none;
}

.dd-faq-chatbot__bubble a:hover {
  text-decoration: underline;
}

.dd-faq-chatbot__suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 13px 14px;
  border-top: 1px solid rgba(200, 164, 107, 0.16);
  background: #fff;
  scrollbar-width: none;
}

.dd-faq-chatbot__suggestions::-webkit-scrollbar {
  display: none;
}

.dd-faq-chatbot__chip {
  flex: 0 0 auto;
  border: 1px solid rgba(200, 164, 107, 0.34);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--dd-chat-ink);
  background: #fffaf2;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dd-faq-chatbot__chip:hover,
.dd-faq-chatbot__chip:focus-visible {
  border-color: var(--dd-chat-gold);
  background: #fff3dc;
  transform: translateY(-1px);
}

.dd-faq-chatbot__chip--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--dd-chat-ink), var(--dd-chat-gold-dark));
  border-color: transparent;
}

.dd-faq-chatbot__form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px 15px;
  background: #fff;
  border-top: 1px solid rgba(200, 164, 107, 0.16);
}

.dd-faq-chatbot__form input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(200, 164, 107, 0.36);
  border-radius: 999px;
  outline: none;
  padding: 0 15px;
  color: var(--dd-chat-ink);
  background: #fffaf4;
  font-size: 13px;
}

.dd-faq-chatbot__form input:focus {
  border-color: var(--dd-chat-gold);
  box-shadow: 0 0 0 4px rgba(200, 164, 107, 0.14);
}

.dd-faq-chatbot__form button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--dd-chat-gold-dark), var(--dd-chat-gold));
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(155, 113, 56, 0.22);
}

.dd-faq-chatbot__form button:hover,
.dd-faq-chatbot__form button:focus-visible {
  filter: brightness(0.96);
}

@media (max-width: 575.98px) {
  .dd-faq-chatbot {
    right: 14px;
    bottom: 14px;
  }

  .dd-faq-chatbot__launcher {
    min-width: 58px;
    width: 58px;
    padding: 0;
  }

  .dd-faq-chatbot__launcher-text {
    display: none;
  }

  .dd-faq-chatbot__panel {
    right: -2px;
    bottom: 70px;
    width: calc(100vw - 24px);
    height: min(610px, calc(100vh - 96px));
    border-radius: 23px;
  }
}
