/* ═══════════════════════════════════════════════════════════
   PREMIUM VOICE AI ORB (THE SMART SHOCK)
   World-class fluid interaction with speech API
   ═══════════════════════════════════════════════════════════ */

.ai-voice-orb-container {
    position: fixed;
    bottom: 110px;
    left: 30px;
    right: auto !important;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    pointer-events: none;
}

/* The Chat/Tooltip Bulb */
.ai-voice-tooltip {
    background: rgba(10, 15, 20, 0.85);
    border: 1px solid rgba(163, 207, 43, 0.4);
    padding: 12px 20px;
    border-radius: 12px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    max-width: 250px;
    text-align: right;
}

body.ltr .ai-voice-tooltip {
    text-align: left;
}

.ai-voice-tooltip.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ai-voice-tooltip .ai-typing-indicator {
    display: inline-flex;
    gap: 4px;
}

.ai-typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--awa-emerald, #b2d235);
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}

.ai-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0% { transform: translateY(0); opacity: 0.5; }
    100% { transform: translateY(-5px); opacity: 1; }
}

/* The Orb */
.ai-voice-orb {
    width: 60px;
    height: 60px;
    position: relative;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.ai-voice-orb:hover {
    transform: scale(1.1);
}

.ai-orb-core-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(163, 207, 43, 0.8), rgba(0, 229, 200, 0.2));
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(163, 207, 43, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.2);
    animation: orbPulse 4s infinite alternate;
}

.ai-voice-orb.listening .ai-orb-core-bg {
    background: radial-gradient(circle at 30% 30%, rgba(255, 95, 86, 0.8), rgba(200, 50, 50, 0.2));
    box-shadow: 0 0 30px rgba(255, 95, 86, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: listeningPulse 0.8s infinite alternate;
}

.ai-voice-orb.speaking .ai-orb-core-bg {
    background: radial-gradient(circle at 30% 30%, rgba(0, 229, 200, 0.9), rgba(163, 207, 43, 0.4));
    box-shadow: 0 0 40px rgba(0, 229, 200, 0.7);
    animation: speakingPulse 0.3s infinite alternate;
}

.ai-orb-ring-1, .ai-orb-ring-2 {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.ai-orb-ring-1 {
    width: 130%;
    height: 130%;
    border-top-color: transparent;
    border-bottom-color: rgba(163, 207, 43, 0.8);
    animation: spinRight 6s linear infinite;
}

.ai-orb-ring-2 {
    width: 160%;
    height: 160%;
    border-right-color: transparent;
    border-left-color: rgba(0, 229, 200, 0.6);
    animation: spinLeft 10s linear infinite;
}

.ai-orb-icon {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
    transition: all 0.3s;
}

/* Animations */
@keyframes orbPulse {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(163, 207, 43, 0.4); }
    100% { transform: scale(1.05); box-shadow: 0 0 35px rgba(163, 207, 43, 0.6); }
}

@keyframes listeningPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 15px rgba(255, 95, 86, 0.4); }
    100% { transform: scale(1.15); box-shadow: 0 0 40px rgba(255, 95, 86, 0.8); }
}

@keyframes speakingPulse {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 229, 200, 0.5); }
    100% { transform: scale(1.1); box-shadow: 0 0 50px rgba(0, 229, 200, 0.9); }
}

@keyframes spinRight { 100% { transform: rotate(360deg); } }
@keyframes spinLeft { 100% { transform: rotate(-360deg); } }

/* Ripple waves when speaking */
.ai-orb-waves {
    position: absolute;
    width: 100%;
    height: 100%;
}
.ai-voice-orb.speaking .ai-orb-waves::before,
.ai-voice-orb.speaking .ai-orb-waves::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    border: 1px solid rgba(0, 229, 200, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    animation: waveOut 1s infinite cubic-bezier(0.1, 0.8, 0.3, 1);
}
.ai-voice-orb.speaking .ai-orb-waves::after {
    animation-delay: 0.5s;
}

@keyframes waveOut {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}
