.dudi-chatbot-launcher {
  position: fixed;
  right: 20px;
  bottom: 22px;
  width: 62px;
  height: 62px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd700, #f7b500);
  color: #1d2f6f;
  font-size: 24px;
  box-shadow: 0 10px 30px rgba(8, 21, 61, 0.35);
  cursor: pointer;
  z-index: 10040;
}

.dudi-chatbot-launcher.has-nudge {
  animation: dudi-chatbot-pulse 1.6s ease-in-out infinite;
}

.dudi-chatbot-launcher:hover {
  transform: translateY(-1px);
}

.dudi-chatbot-launcher:focus-visible {
  outline: 3px solid #ffe78a;
  outline-offset: 2px;
}

.dudi-chatbot-panel {
  position: fixed;
  right: 20px;
  bottom: 96px;
  width: min(380px, calc(100vw - 24px));
  max-height: min(580px, calc(100vh - 120px));
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 55px rgba(8, 21, 61, 0.3);
  border: 1px solid rgba(32, 79, 179, 0.15);
  z-index: 10041;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.dudi-chatbot-panel.open {
  display: flex;
}

.dudi-chatbot-reengage {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10039;
}

.dudi-chatbot-reengage.open {
  display: flex;
}

.dudi-chatbot-reengage-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 20, 56, 0.48);
  backdrop-filter: blur(3px);
}

.dudi-chatbot-reengage-modal {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  border: 1px solid rgba(32, 79, 179, 0.18);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(8, 21, 61, 0.32);
  padding: 26px 24px 22px;
  text-align: center;
}

.dudi-chatbot-teaser-eyebrow {
  margin: 0 0 10px;
  color: #204fb3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dudi-chatbot-teaser-title {
  margin: 0 32px 10px;
  color: #17336f;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 900;
}

.dudi-chatbot-teaser-text {
  margin: 0 auto;
  max-width: 430px;
  color: #43506f;
  font-size: 16px;
  line-height: 1.55;
}

.dudi-chatbot-teaser-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  justify-content: center;
}

.dudi-chatbot-teaser-btn {
  border: 1px solid #d7e1f7;
  border-radius: 999px;
  background: #fff;
  color: #1b2d55;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dudi-chatbot-teaser-btn.primary {
  border-color: #ffd24a;
  background: linear-gradient(135deg, #ffd24a 0%, #ffbf1f 100%);
  color: #3b2b00;
  box-shadow: 0 12px 24px rgba(247, 181, 0, 0.28);
  font-weight: 900;
  padding: 14px 26px;
  min-width: min(320px, 100%);
  font-size: 16px;
}

.dudi-chatbot-teaser-btn.subtle {
  border-color: #d7e1f7;
  background: #ffffff;
  color: #60708d;
  min-width: min(320px, 100%);
  padding: 12px 22px;
  font-weight: 800;
}

.dudi-chatbot-teaser-btn.whatsapp {
  border-color: #b7ebc8;
  background: linear-gradient(135deg, #25d366 0%, #1ebe5d 100%);
  color: #08351d;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.24);
  font-weight: 900;
  padding: 14px 26px;
  min-width: min(320px, 100%);
  font-size: 16px;
}

.dudi-chatbot-teaser-btn.whatsapp:hover {
  background: linear-gradient(135deg, #27dd6d 0%, #20c362 100%);
}

.dudi-chatbot-teaser-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  color: #6c7897;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dudi-chatbot-header {
  padding: 14px 16px;
  background: linear-gradient(160deg, #204fb3, #14377f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dudi-chatbot-header-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.dudi-chatbot-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dudi-chatbot-body {
  padding: 12px;
  background: #f5f8ff;
  overflow: auto;
  flex: 1;
}

.dudi-chatbot-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-line;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.dudi-chatbot-msg.bot {
  background: #ffffff;
  border: 1px solid rgba(32, 79, 179, 0.2);
  color: #1f2a44;
}

.dudi-chatbot-msg.user {
  margin-left: auto;
  background: #8d9ab2;
  color: #f4f7ff;
}

.dudi-chatbot-msg.is-old.bot {
  background: #eef1f6;
  border-color: #d8dee8;
  color: #5f6d80;
  opacity: 0.9;
}

.dudi-chatbot-msg.is-old.user {
  background: #aeb8c9;
  color: #eff3fb;
  opacity: 0.9;
}

.dudi-chatbot-msg.is-new {
  box-shadow: 0 10px 20px rgba(32, 79, 179, 0.16);
}

.dudi-chatbot-msg.is-new.bot {
  background: #ffffff;
  border-color: rgba(32, 79, 179, 0.35);
  color: #1b2d55;
}

.dudi-chatbot-msg.is-new.user {
  background: #7f8ea8;
  color: #f5f8ff;
}

.dudi-chatbot-actions {
  padding: 0 12px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: #f5f8ff;
}

.dudi-chatbot-actions.single-cta {
  justify-content: center;
  padding: 6px 16px 16px;
}

.dudi-chatbot-action-btn {
  border: 1px solid #d7a600;
  border-radius: 999px;
  background: #ffd24a;
  color: #3b2b00;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dudi-chatbot-action-btn:hover {
  background: #ffdf78;
}

.dudi-chatbot-action-btn.primary-cta {
  min-width: min(280px, 100%);
  justify-content: center;
  padding: 13px 22px;
  border: none;
  background: linear-gradient(135deg, #ffd54a 0%, #ffb703 100%);
  color: #2f2400;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 32px rgba(247, 181, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.dudi-chatbot-action-btn.primary-cta:hover {
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.04);
  box-shadow: 0 18px 36px rgba(247, 181, 0, 0.34);
}

.dudi-chatbot-action-btn.primary-cta:focus-visible {
  outline: 3px solid #ffe78a;
  outline-offset: 2px;
}

.dudi-chatbot-action-btn.whatsapp-cta {
  border: 1px solid #25d366;
  background: linear-gradient(135deg, #25d366 0%, #1ebe5d 100%);
  color: #08351d;
  min-width: min(280px, 100%);
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.dudi-chatbot-action-btn.whatsapp-cta:hover {
  background: linear-gradient(135deg, #27dd6d 0%, #20c362 100%);
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.04);
  box-shadow: 0 18px 36px rgba(37, 211, 102, 0.3);
}

.dudi-chatbot-input-wrap {
  border-top: 1px solid #e7ecf8;
  padding: 10px;
  display: flex;
  gap: 8px;
  background: #fff;
}

.dudi-chatbot-input-wrap.is-hidden {
  display: none;
}

.dudi-chatbot-input {
  flex: 1;
  border: 1px solid #d6dff3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.dudi-chatbot-input:focus {
  border-color: #204fb3;
  box-shadow: 0 0 0 3px rgba(32, 79, 179, 0.12);
}

.dudi-chatbot-send {
  border: none;
  border-radius: 10px;
  background: #ffd24a;
  color: #3b2b00;
  padding: 0 14px;
  font-size: 14px;
  cursor: pointer;
}

.dudi-chatbot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@keyframes dudi-chatbot-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(8, 21, 61, 0.35);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 14px 38px rgba(32, 79, 179, 0.42);
  }
}

@media (max-width: 767px) {
  .dudi-chatbot-launcher {
    width: 56px;
    height: 56px;
    right: 12px;
    bottom: 14px;
  }

  .dudi-chatbot-panel {
    right: 12px;
    bottom: 78px;
    max-height: calc(100vh - 96px);
    border-radius: 14px;
  }

  .dudi-chatbot-reengage {
    padding: 14px;
  }

  .dudi-chatbot-reengage-modal {
    width: min(100%, 420px);
    border-radius: 20px;
    padding: 22px 18px 18px;
  }

  .dudi-chatbot-teaser-title {
    margin: 0 24px 10px;
    font-size: 22px;
  }

  .dudi-chatbot-teaser-text {
    font-size: 15px;
  }

  .dudi-chatbot-teaser-btn.primary {
    min-width: 100%;
  }
}
