/* Depósito Trujillo — storefront assistant FAB + panel (high visibility) */
.dt-assistant {
  --dt-asst-bg: #0f2744;
  --dt-asst-accent: #ffc107;
  --dt-asst-accent-hot: #ffb300;
  --dt-asst-panel: #ffffff;
  --dt-asst-text: #1a1a1a;
  --dt-asst-muted: #5c6670;
  --dt-asst-radius: 14px;
  --dt-asst-shadow: 0 12px 40px rgba(15, 39, 68, 0.32);
  font-family: inherit;
  z-index: 10040;
}

@keyframes dt-asst-pulse {
  0%,
  100% {
    box-shadow:
      0 12px 36px rgba(15, 39, 68, 0.55),
      0 0 0 0 rgba(255, 193, 7, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 16px 44px rgba(15, 39, 68, 0.6),
      0 0 0 14px rgba(255, 193, 7, 0.15);
    transform: scale(1.03);
  }
}

@keyframes dt-asst-wiggle {
  0%,
  88%,
  100% {
    transform: rotate(0deg);
  }
  90% {
    transform: rotate(-8deg);
  }
  94% {
    transform: rotate(8deg);
  }
  97% {
    transform: rotate(-4deg);
  }
}

.dt-assistant__fab {
  position: fixed;
  right: 1.25rem;
  bottom: 5.25rem; /* clear dark footer / payment strip */
  z-index: 10050;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 72px;
  max-width: calc(100vw - 1.5rem);
  padding: 1rem 1.55rem 1rem 1.2rem;
  border: 3px solid #0f2744;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd54f 0%, var(--dt-asst-accent) 55%, var(--dt-asst-accent-hot) 100%);
  color: #0f2744;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  cursor: pointer;
  box-shadow:
    0 12px 36px rgba(15, 39, 68, 0.55),
    0 0 0 5px rgba(255, 193, 7, 0.4);
  animation:
    dt-asst-pulse 2.2s ease-in-out infinite,
    dt-asst-wiggle 5.5s ease-in-out infinite;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.dt-assistant__fab:hover,
.dt-assistant__fab:focus-visible {
  background: linear-gradient(180deg, #ffe082 0%, #ffca28 50%, #ffb300 100%);
  outline: 3px solid #0f2744;
  outline-offset: 4px;
  animation: none;
  transform: scale(1.05);
  box-shadow:
    0 16px 44px rgba(15, 39, 68, 0.6),
    0 0 0 6px rgba(255, 193, 7, 0.45);
}

.dt-assistant__fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: #0f2744;
  color: #ffc107;
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.dt-assistant__fab-label {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.dt-assistant__panel {
  position: fixed;
  right: 1.25rem;
  bottom: 11rem;
  z-index: 10051;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 1.5rem));
  height: min(560px, calc(100vh - 12rem));
  background: var(--dt-asst-panel);
  color: var(--dt-asst-text);
  border-radius: var(--dt-asst-radius);
  border: 2px solid var(--dt-asst-bg);
  box-shadow: var(--dt-asst-shadow);
  overflow: hidden;
}

.dt-assistant__panel[hidden] {
  display: none !important;
}

.dt-assistant__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.95rem 1.1rem;
  background: var(--dt-asst-bg);
  color: #fff;
}

.dt-assistant__title {
  font-size: 1rem;
  font-weight: 700;
}

.dt-assistant__close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.dt-assistant__messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.95rem 1.1rem;
  background: #f4f6f8;
}

.dt-assistant__bubble {
  max-width: 92%;
  margin-bottom: 0.65rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.dt-assistant__bubble--bot {
  background: #fff;
  color: var(--dt-asst-text);
  border: 1px solid #e2e6ea;
  border-bottom-left-radius: 4px;
}

.dt-assistant__bubble--user {
  margin-left: auto;
  background: var(--dt-asst-bg);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.dt-assistant__bubble--error {
  background: #fdecea;
  color: #8a1f11;
  border: 1px solid #f5c6cb;
}

.dt-assistant__form {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  border-top: 1px solid #e2e6ea;
  background: #fff;
}

.dt-assistant__input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid #cfd6dd;
  border-radius: 8px;
  font-size: 0.95rem;
}

.dt-assistant__send {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--dt-asst-accent);
  color: #0f2744;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.dt-assistant__send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dt-assistant__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;
}

@media (max-width: 480px) {
  .dt-assistant__fab {
    right: 0.75rem;
    bottom: 4.75rem;
    min-height: 64px;
    padding: 0.9rem 1.25rem 0.9rem 1rem;
    font-size: 1.05rem;
    gap: 0.6rem;
  }

  .dt-assistant__fab-icon {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 1.3rem;
  }

  .dt-assistant__panel {
    right: 0.5rem;
    left: 0.5rem;
    bottom: 9.75rem;
    width: auto;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dt-assistant__fab {
    animation: none;
  }
}
