/* ==========================================================
   Digi AI Assistant – CLEAN, FINAL CSS
   (Safe: only affects Digi, not the rest of the site)
   ========================================================== */

:root {
  --text-muted: #b0bec5;
}

/* Floating bubble */
.ai-assistant-bubble {
  position: fixed;
  right: 18px;
  bottom: 100px;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 10%, #ffd54f, #f44336 55%, #1a73e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 2px rgba(26, 115, 232, 0.5),
    0 10px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 1200;
  animation: digiFloat 3s ease-in-out infinite;
}

.ai-assistant-bubble::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  animation: digiPulse 2.4s ease-out infinite;
}

.ai-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Popup container */
.ai-assistant-popup {
  position: fixed;
  right: 18px;
  bottom: 100px;
  width: 290px;
  max-width: calc(100% - 40px);
  background: rgba(10, 15, 35, 0.96);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(63, 81, 181, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1200;
  display: none;
  animation: digiPopupIn 0.2s ease-out forwards;
  color: #e2ebff;
}

/* Header */
.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.8);
}

.ai-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-name {
  font-size: 14px;
  font-weight: 600;
}

.ai-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Close + speaker cluster */
.ai-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* SPEAKER BUTTON – this is the 🔊 button  */
.ai-voice-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(144, 164, 174, 0.7);
  border-radius: 999px;
  color: #eceff1;
  font-size: 12px;
  min-width: 40px;
  height: 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}


/* state classes used by JS */
.ai-voice-toggle.active {
  background: rgba(255, 193, 7, 0.18);
  border-color: rgba(255, 235, 59, 0.9);
}

/* extra safety in case text is hidden by some global CSS */
.ai-voice-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}



.ai-voice-toggle.muted {
  opacity: 0.6;
}

.ai-close {
  background: transparent;
  border: none;
  color: #b0bec5;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 4px;
  border-radius: 999px;
}

.ai-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Body */
.ai-body {
  font-size: 13px;
  margin-top: 4px;
}

.ai-line {
  margin: 4px 0;
}

/* Main action buttons */
.ai-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 6px;
}

.ai-btn {
  border: none;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
  background: linear-gradient(135deg, #ffb300, #ff7043);
  color: #111;
  font-weight: 600;
  text-align: left;
}

.ai-btn.secondary {
  background: rgba(26, 115, 232, 0.1);
  color: #e3f2fd;
  border: 1px solid rgba(144, 202, 249, 0.5);
}

.ai-btn:hover {
  filter: brightness(1.05);
}

/* Hint text */
.ai-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Wizard block */
.ai-wizard {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(144, 164, 174, 0.6);
}

.ai-wizard-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 4px;
}

.ai-btn.wizard {
  font-size: 12px;
  padding: 6px 8px;
  line-height: 1.2;
}

.ai-wizard-result {
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(33, 150, 243, 0.08);
  border: 1px solid rgba(144, 202, 249, 0.4);
  font-size: 12px;
}

.ai-wizard-result strong {
  color: #ffeb3b;
}

/* FAQ section */
.ai-faq {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(144, 164, 174, 0.6);
}

.ai-faq-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 4px;
}

.ai-btn.faq {
  font-size: 12px;
  padding: 6px 8px;
  line-height: 1.3;
}

.ai-faq-answer {
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(26, 115, 232, 0.12);
  border: 1px solid rgba(144, 202, 249, 0.45);
  font-size: 12px;
}

.ai-faq-answer strong {
  color: #ffeb3b;
}

/* Animations */
@keyframes digiFloat {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

@keyframes digiPulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

@keyframes digiPopupIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Gentle nudge animation for Digi bubble */
.ai-assistant-bubble.digi-nudge {
  animation: digiNudge 0.4s ease-out;
}

@keyframes digiNudge {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-2px) scale(1.06); }
  60%  { transform: translateY(0) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .ai-assistant-bubble {
    right: 12px;
    bottom: 12px;
    width: 62px;
    height: 62px;
  }
  .ai-assistant-popup {
    right: 10px;
    bottom: 86px;
    width: calc(100% - 20px);
  }
}
/* Force normal text font for Digi buttons (fixes "??") */
.ai-header-actions,
.ai-voice-toggle,
.ai-close {
  font-family: Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  text-transform: none !important;
}

/* Voice button appearance */
.ai-voice-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(144, 164, 174, 0.7);
  border-radius: 999px;
  color: #eceff1;
  font-size: 12px;
  min-width: 40px;
  height: 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}



