/* Alpha Finans - Floating Voice Button Styles */

.alpha-voice-btn-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: var(--z-toast);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* RTL support */
[dir="rtl"] .alpha-voice-btn-container {
    left: auto;
    right: 24px;
}

.alpha-voice-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color, #2563eb);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
    
}

.alpha-voice-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.alpha-voice-btn:focus-visible {
    outline: 3px solid var(--focus-color, #60a5fa);
    outline-offset: 2px;
}

.alpha-voice-btn:active {
    transform: scale(0.95);
}

/* Speaking state - pulsing animation */
.alpha-voice-btn.is-speaking {
    background: #16a34a;
    animation: voice-pulse 1.5s ease-in-out infinite;
}

/* Paused state */
.alpha-voice-btn.is-paused {
    background: #d97706;
}

/* Tooltip */
.alpha-voice-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.alpha-voice-btn-container:hover .alpha-voice-tooltip {
    opacity: 1;
}

/* Pulse animation */
@keyframes voice-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(22, 163, 74, 0.6);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .alpha-voice-btn.is-speaking {
        animation: none;
    }
    .alpha-voice-btn {
        transition: none;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .alpha-voice-btn-container {
        bottom: 16px;
        left: 16px;
    }
    [dir="rtl"] .alpha-voice-btn-container {
        left: auto;
        right: 16px;
    }
}

/* High contrast mode */
@media (forced-colors: active) {
    .alpha-voice-btn {
        border: 2px solid ButtonText;
    }
}
