/* Daccina chatbot shell — foundation UI only */

.daccina-chatbot__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.daccina-chatbot {
  position: fixed;
  left: 16px;
  bottom: 8px;
  z-index: 999999;
  font-family: var(--font-primary, "Poppins", sans-serif);
  font-size: 14px;
  color: var(--text-heading, #1f2233);
}

/* Minimized: full character launcher */
.daccina-chatbot.daccina-chatbot--minimized .daccina-chatbot__panel {
  display: none;
}

.daccina-chatbot.daccina-chatbot--minimized .daccina-chatbot__launcher {
  display: flex;
}

/* Expanded: chat panel only */
.daccina-chatbot.daccina-chatbot--expanded .daccina-chatbot__panel {
  display: flex;
}

.daccina-chatbot.daccina-chatbot--expanded .daccina-chatbot__launcher {
  display: none;
}

.daccina-chatbot.daccina-chatbot--closed {
  display: none;
}

/* Full D-Orion character launcher — no pill / circle */
.daccina-chatbot__launcher {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  color: var(--secondary, #555663);
  box-shadow: none;
  transition: transform 0.25s ease;
  animation: daccina-chatbot-float 3.5s ease-in-out infinite;
}

.daccina-chatbot__launcher:hover {
  transform: scale(1.04) translateY(-2px);
  animation-play-state: paused;
}

.daccina-chatbot__launcher-character {
  position: relative;
  display: block;
  width: 140px;
  height: 140px;
  line-height: 0;
  background: transparent;
}

.daccina-chatbot__launcher-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--secondary, #555663);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.daccina-chatbot__robot-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.daccina-chatbot__robot-img--launcher {
  filter: drop-shadow(0 8px 18px rgba(52, 138, 220, 0.22));
}

.daccina-chatbot__lottie-host {
  position: relative;
  overflow: visible;
  background: transparent;
}

.daccina-chatbot__lottie-host--launcher {
  width: 140px;
  height: 140px;
}

.daccina-chatbot__lottie-host--header {
  width: 52px;
  height: 52px;
}

.daccina-chatbot__lottie-host[data-lottie-loaded="true"] {
  background: transparent;
}

.daccina-chatbot__lottie-host svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
  overflow: visible;
}

.daccina-chatbot__avatar,
.daccina-chatbot__lottie {
  width: 52px;
  height: 52px;
  border-radius: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.daccina-chatbot__panel {
  flex-direction: column;
  width: min(380px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 100px));
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--card-shadow, 0px 10px 30px rgba(52, 138, 220, 0.2));
  overflow: hidden;
  border: 1px solid var(--neutral-200, #c6d1d7);
}

.daccina-chatbot.daccina-chatbot--expanded .daccina-chatbot__panel {
  margin-bottom: 8px;
}

.daccina-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-muted, #edeff3);
  border-bottom: 1px solid var(--neutral-200, #c6d1d7);
}

.daccina-chatbot__header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.daccina-chatbot__lottie[data-lottie-loaded="true"] {
  background: transparent;
}


.daccina-chatbot__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daccina-chatbot__prompt-btn {
  padding: 8px 12px;
  border: 1px solid var(--neutral-200, #c6d1d7);
  border-radius: 999px;
  background: #fff;
  color: var(--primary, #348adc);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.daccina-chatbot__prompt-btn:hover {
  background: rgba(52, 138, 220, 0.08);
  border-color: var(--primary, #348adc);
}

.daccina-chatbot__welcome.is-hidden {
  display: none;
}

.daccina-chatbot__name {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}

.daccina-chatbot__context {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-body, #555663);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daccina-chatbot__header-actions {
  display: flex;
  gap: 4px;
}

.daccina-chatbot__icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text-heading, #1f2233);
}

.daccina-chatbot__icon-btn:hover {
  background: rgba(52, 138, 220, 0.12);
}

.daccina-chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 180px;
  background: #fafbfc;
}

.daccina-chatbot__welcome {
  margin-bottom: 12px;
}

.daccina-chatbot__welcome-text {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--neutral-200, #c6d1d7);
  line-height: 1.5;
  color: var(--text-body, #555663);
}

.daccina-chatbot__bubble {
  margin-bottom: 10px;
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.45;
}

.daccina-chatbot__bubble--user {
  margin-left: auto;
  background: var(--primary, #348adc);
  color: #fff;
}

.daccina-chatbot__bubble--assistant {
  margin-right: auto;
  background: #fff;
  border: 1px solid var(--neutral-200, #c6d1d7);
  color: var(--text-body, #555663);
  white-space: pre-line;
}

.daccina-chatbot__typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px 12px;
  background: #fafbfc;
}

.daccina-chatbot__typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral-300, #9fa0b5);
  animation: daccina-chatbot-bounce 1.2s ease-in-out infinite;
}

.daccina-chatbot__typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.daccina-chatbot__typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes daccina-chatbot-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.daccina-chatbot__composer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--neutral-200, #c6d1d7);
  background: #fff;
}

.daccina-chatbot__input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--neutral-200, #c6d1d7);
  border-radius: 10px;
  font: inherit;
}

.daccina-chatbot__send {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  background: var(--primary, #348adc);
  color: #fff;
}

.daccina-chatbot__send:hover {
  filter: brightness(1.05);
}

.daccina-chatbot__reopen {
  position: fixed;
  left: 16px;
  bottom: 8px;
  z-index: 999998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  animation: daccina-chatbot-float 3.5s ease-in-out infinite;
}

.daccina-chatbot__reopen:hover {
  transform: scale(1.04) translateY(-2px);
  animation-play-state: paused;
}

@keyframes daccina-chatbot-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes daccina-chatbot-nod {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@media (max-width: 575.98px) {
  .daccina-chatbot {
    left: 8px;
    bottom: 4px;
  }

  .daccina-chatbot__launcher-character,
  .daccina-chatbot__lottie-host--launcher {
    width: 112px;
    height: 112px;
  }

  .daccina-chatbot__reopen {
    left: 8px;
    bottom: 4px;
  }

  .daccina-chatbot__panel {
    width: calc(100vw - 24px);
  }
}
