/* Text-to-Speech Floating Button Styles - Simple Version */

/* ปุ่มลอยอ่านออกเสียง */
.tts-floating-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    animation: pulse-glow 2s infinite;
}

.tts-floating-button:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.7);
}

.tts-floating-button:active {
    transform: translateY(-2px) scale(1.05);
}

.tts-floating-button.speaking {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse-speaking 1s infinite;
}

.tts-floating-button.speaking:hover {
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.7);
}

/* Animation Effects */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    }

    50% {
        box-shadow: 0 6px 30px rgba(102, 126, 234, 0.8);
    }
}

@keyframes pulse-speaking {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 30px rgba(245, 87, 108, 0.9);
    }
}

/* Tooltip on hover */
.tts-floating-button::before {
    content: 'อ่านออกเสียง';
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.tts-floating-button:hover::before {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tts-floating-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
        bottom: 20px;
        left: 20px;
    }

    .tts-floating-button::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .tts-floating-button {
        width: 55px;
        height: 55px;
        font-size: 22px;
        bottom: 15px;
        left: 15px;
    }
}

/* Accessibility */
.tts-floating-button:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}