/**
 * Hanika Voice Guide - CSS Styles
 * Floating control button and UI elements
 */

/* ============================================
   FLOATING CONTROL BUTTON
   ============================================ */

.hanika-voice-control {
    position: fixed;
    bottom: 100px;
    left: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hanika-voice-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.hanika-voice-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.hanika-voice-toggle:active {
    transform: scale(0.95);
}

.hanika-voice-icon {
    font-size: 24px;
    line-height: 1;
}

/* Speaking animation */
.hanika-speaking {
    animation: hanikaPulse 1s ease-in-out infinite;
}

@keyframes hanikaPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.8);
    }
}

/* ============================================
   CONTROL MENU
   ============================================ */

.hanika-voice-menu {
    position: absolute;
    bottom: 70px;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 160px;
    animation: hanikaFadeInUp 0.2s ease;
}

@keyframes hanikaFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hanika-voice-menu button {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    text-align: right;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    font-family: inherit;
}

.hanika-voice-menu button:hover {
    background: #f3f4f6;
}

.hanika-voice-menu button span:first-child {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 768px) {
    .hanika-voice-control {
        bottom: 80px;
        left: 15px;
    }
    
    .hanika-voice-toggle {
        width: 50px;
        height: 50px;
    }
    
    .hanika-voice-icon {
        font-size: 22px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.hanika-voice-toggle:focus {
    outline: 3px solid #10b981;
    outline-offset: 2px;
}

.hanika-voice-menu button:focus {
    outline: 2px solid #10b981;
    outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hanika-voice-toggle {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hanika-voice-toggle,
    .hanika-voice-menu,
    .hanika-voice-menu button {
        animation: none;
        transition: none;
    }
    
    .hanika-speaking {
        animation: none;
    }
}

/* ============================================
   RTL SUPPORT
   ============================================ */

[dir="rtl"] .hanika-voice-control {
    left: auto;
    right: 20px;
}

[dir="rtl"] .hanika-voice-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .hanika-voice-menu button {
    text-align: left;
    flex-direction: row-reverse;
}
