/* Euroforum Text to Speech Styles */

.eftts-container {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.eftts-container.collapsed {
    padding: 6px 10px;
    background: transparent;
}

.eftts-reading-time {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    margin-left: 8px;
}

.eftts-controls {
    display: none;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.eftts-container.expanded .eftts-controls {
    display: flex;
}

.eftts-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.eftts-button:hover {
    background: #1976D2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.eftts-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.eftts-button.playing {
    background: #f44336;
}

.eftts-button.playing:hover {
    background: #d32f2f;
}

.eftts-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.eftts-button.playing .eftts-icon-play {
    display: none;
}

.eftts-button.playing .eftts-icon-stop {
    display: block !important;
}

.eftts-pause-button {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #FF9800;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.eftts-container.expanded .eftts-pause-button {
    display: inline-flex;
}

.eftts-skip-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #607D8B;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.eftts-skip-button:hover {
    background: #455A64;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.eftts-skip-button svg {
    width: 16px;
    height: 16px;
}

.eftts-pause-button:hover {
    background: #F57C00;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.eftts-rate-control {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 150px;
}

.eftts-rate-label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.eftts-rate-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.eftts-rate-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    transition: all 0.15s ease;
}

.eftts-rate-slider::-webkit-slider-thumb:hover {
    background: #1976D2;
    transform: scale(1.15);
}

.eftts-rate-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.eftts-rate-slider::-moz-range-thumb:hover {
    background: #1976D2;
    transform: scale(1.15);
}

.eftts-rate-value {
    font-size: 12px;
    font-weight: 600;
    color: #2196F3;
    min-width: 35px;
    text-align: right;
}

/* Content highlighting */
#eftts-content {
    line-height: 1.8;
}

#eftts-content .eftts-highlight {
    background-color: #ffeb3b;
    padding: 2px 0;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

/* Ensure text remains readable when highlighted */
#eftts-content .eftts-highlight a {
    color: inherit;
}

/* Hide button if browser doesn't support speech synthesis */
.eftts-no-support .eftts-container {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .eftts-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .eftts-container.collapsed {
        align-items: flex-start;
    }
    
    .eftts-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .eftts-button,
    .eftts-pause-button {
        width: 100%;
        justify-content: center;
    }
    
    .eftts-container.collapsed .eftts-button {
        width: auto;
    }
    
    .eftts-rate-control {
        width: 100%;
        min-width: auto;
    }
}
