/* AI Voice Assistant Styles */
#ai-voice-assistant {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}


/* ======= Floating Mic Button (Always Visible) ======= */
.ai-va-toggle {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #00d2ff, #3a47d5);
  box-shadow: 0 0 20px rgba(58, 71, 213, 0.6), 0 0 40px rgba(0, 210, 255, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999; /* Increased to always appear on top */
  transition: all 0.4s ease;
  animation: floatUpDown 3s ease-in-out infinite;
  transform: translateZ(0);
}

/* Mic glow and hover */
.ai-va-toggle:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 0 30px rgba(58, 71, 213, 0.9), 0 0 60px rgba(0, 210, 255, 0.5);
  background: radial-gradient(circle at 30% 30%, #2ee0ff, #5a5ff0);
}

/* ======= Mic Icon Inside Button ======= */
.ai-va-icon {
  position: relative;
  font-size: 32px;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 16px rgba(0, 210, 255, 0.5);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.ai-va-toggle:hover .ai-va-icon {
  transform: scale(1.15);
}

/* Optional animated pulse around mic */
.ai-va-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  animation: pulseGlow 2s infinite;
}

/* Animation for subtle breathing effect */
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.6; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}


/* Perfectly centered icon */
.ai-va-icon {
  position: relative;
  font-size: 30px;
  color: #fff;
  line-height: 1; /* removes default Font Awesome offset */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.ai-va-toggle:hover .ai-va-icon {
  transform: scale(1.1);
}

/* Optional fix: ensure waves do not push icon */
.ai-va-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  animation: wavePulse 2s infinite ease-out;
}



/* Popup */
.ai-va-popup {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.ai-va-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ai-va-robot {
    width: 50px;
    height: 50px;
    margin-right: 12px;
}

.ai-va-robot img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.ai-va-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.ai-va-audio-controls {
    display: flex;
    gap: 8px;
}

.ai-va-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ai-va-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-va-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    margin-left: auto;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.ai-va-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Content */
.ai-va-content {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.ai-va-messages {
    margin-bottom: 15px;
}

.ai-va-message {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.ai-va-message.assistant {
    background: #f1f3f5;
    color: #333;
    border-bottom-left-radius: 5px;
}

.ai-va-message.user {
    background: #667eea;
    color: white;
    margin-left: 40px;
    border-bottom-right-radius: 5px;
}

.ai-va-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-va-option-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: all 0.3s ease;
}

.ai-va-option-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

.ai-va-search {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

#ai-va-search-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
}

#ai-va-search-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.ai-va-search-results {
    margin-top: 15px;
}

.ai-va-product {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    background: white;
}

.ai-va-product-image {
    width: 50px;
    height: 50px;
    margin-right: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.ai-va-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-va-product-info {
    flex: 1;
}

.ai-va-product-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.ai-va-product-price {
    color: #667eea;
    font-weight: 600;
    font-size: 13px;
}

.ai-va-view-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.ai-va-typing-indicator {
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 480px) {
    .ai-va-popup {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-va-popup.show {
    animation: slideIn 0.3s ease;
}