/* Podstawowe style */
.tts-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.6;
    font-size: 18px;
}

.tts-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Style przycisków */
.tts-play-button,
.tts-stop-button,
.tts-resume-button,
.tts-selection-toggle {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s, transform 0.2s;
    outline: 3px solid transparent; /* Dla focus */
}

.tts-play-button {
    background-color: #357a38;
    color: white;
}

.tts-stop-button {
    background-color: #b71c1c;
    color: white;
}

.tts-resume-button {
    background-color: #B3612E;
    color: white;
}

.tts-selection-toggle {
    background-color: #0d47a1;
    color: white;
}

/* Focus i stany aktywne */
.tts-play-button:focus,
.tts-stop-button:focus,
.tts-resume-button:focus,
.tts-selection-toggle:focus {
    outline: 3px solid #ffeb3b;
    outline-offset: 2px;
}

.tts-play-button:active,
.tts-stop-button:active,
.tts-resume-button:active,
.tts-selection-toggle:active {
    transform: scale(0.98);
}

/* Hover z wyższym kontrastem */
.tts-play-button:hover {
    background-color: #2e7d32;
}

.tts-stop-button:hover {
    background-color: #c62828;
}

.tts-resume-button:hover {
    background-color: #B3612E;
}

.tts-selection-toggle:hover {
    background-color: #1565c0;
}

/* Stylizacja paska odtwarzania */
.tts-seek-bar {
    width: 100%;
    height: 12px;
    margin: 10px 0 20px;
    background-color: #ccc;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
}

.tts-seek-bar::-webkit-slider-thumb {
    appearance: none;
    height: 20px;
    width: 20px;
    background-color: #4caf50;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.tts-seek-bar::-moz-range-thumb {
    height: 20px;
    width: 20px;
    background-color: #4caf50;
    border-radius: 50%;
    cursor: pointer;
}

.tts-seek-bar:active::-webkit-slider-thumb {
    background-color: #388e3c;
}

/* Responsywność */

/* Małe urządzenia (telefony w pionie) */
@media (max-width: 480px) {
    .tts-container {
        padding: 10px;
        font-size: 16px;
    }

    .tts-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .tts-play-button,
    .tts-stop-button,
    .tts-resume-button,
    .tts-selection-toggle {
        font-size: 16px;
        padding: 10px;
        width: 100%;
    }
}

/* Średnie urządzenia (tablety i telefony w poziomie) */
@media (max-width: 768px) {
    .tts-container {
        padding: 15px;
        font-size: 17px;
    }

    .tts-play-button,
    .tts-stop-button,
    .tts-resume-button,
    .tts-selection-toggle {
        font-size: 17px;
    }
}

/* Duże urządzenia (laptopy) */
@media (max-width: 1024px) {
    .tts-container {
        max-width: 90%;
    }
}

/* Bardzo duże urządzenia (duże monitory) */
@media (min-width: 1200px) {
    .tts-container {
        max-width: 70%;
    }
}
