/**
 * TTS ResponsiveVoice Styles
 * Version: 1.0.0
 */

/* Clickable Elements */
.tts-clickable {
    cursor: pointer !important;
    position: relative;
    transition: background-color 0.3s ease;
}

.tts-clickable:hover {
    background-color: rgba(33, 150, 243, 0.05);
}

/* TTS Icon */
.tts-icon {
    display: inline-block;
    margin-right: 5px;
    font-size: 0.9em;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.tts-clickable:hover .tts-icon {
    opacity: 0.8;
    transform: scale(1.1);
}

.tts-icon:hover {
    opacity: 1 !important;
    transform: scale(1.2) !important;
}

/* Floating Button */
.tts-floating-button {
    position: fixed;
    display: none;
    padding: 8px 12px;
    background: #2196F3;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 999999;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    white-space: nowrap;
}

.tts-floating-button:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.tts-floating-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .tts-icon {
        font-size: 0.85em;
        margin-right: 3px;
    }
    
    .tts-floating-button {
        padding: 10px 14px;
        font-size: 15px;
    }
}

/* Accessibility */
.tts-clickable:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

.tts-floating-button:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Animation für Highlight beim Klick */
@keyframes tts-highlight {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: #ffeb3b;
    }
    100% {
        background-color: transparent;
    }
}

.tts-highlight-animation {
    animation: tts-highlight 0.6s ease;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .tts-clickable:hover {
        background-color: rgba(33, 150, 243, 0.15);
    }
    
    .tts-icon {
        filter: brightness(1.2);
    }
}

/* Print - Icons verstecken */
@media print {
    .tts-icon,
    .tts-floating-button {
        display: none !important;
    }
    
    .tts-clickable {
        cursor: default !important;
    }
}

/* Loading State (optional, für zukünftige Features) */
.tts-loading .tts-icon {
    animation: tts-pulse 1s infinite;
}

@keyframes tts-pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Explizit markierte Elemente mit .tts-readable */
.tts-readable {
    /* Wird automatisch zu .tts-clickable durch JavaScript */
}

/* Status-Indikator (optional) */
.tts-speaking {
    background-color: rgba(255, 235, 59, 0.2);
    border-left: 3px solid #2196F3;
    padding-left: 8px;
}
