.tts-voice-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 10px;
    margin-bottom: 50px;
}

.hr-separator {
    width: 100%;
    margin-bottom: 20px !important;
}

.input-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.text-wrapper {
    position: relative;
    display: flex;
    width: 100%;
    border-radius: 10px;
    border: 1px solid darkgray;
    background-color: white;
    color: black;
    box-shadow: 0 1px 10px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding-bottom: 40px;
}

.text-wrapper textarea, .text-wrapper textarea:focus {
    width: 100%;
    background-color: white;
    border: none;
    resize: none;
    box-shadow: none;
    color: black;
}

.character-counter {
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 12px;
    line-height: 1.5;
}

.speech-to-text-button, .speech-to-text-button:focus {
    position: absolute;
    bottom: 6px;
    left: 6px;
    font-size: 12px;
    color: black;
    border: 1px solid lightgray;
    border-radius: 5px;
    line-height: 1.5;
    padding: 3px 8px;
    background-color: white;
    outline: none;
    text-decoration: none !important;
}

.speech-to-text-button:hover {
    background-color: whitesmoke;
    color: black;
}

.tts-voice-button {
    margin-top: 10px;
    font-size: 20px;
    background-color: black;
    color: white;
    border-radius: 5px;
}

.tts-voice-button:hover, .tts-voice-button:focus {
    background-color: rgb(34, 34, 34);
    color: white;
}

.tts-voice-button:disabled {
    background-color: gray;
    color: white;
}

.voice-selector {
    text-align: center;
}

.voice-selector-title {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
}

.voice-selector-options {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.voice-selector-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 2px solid lightgray;
    border-radius: 5px;
    padding: 5px 10px;
    line-height: 1;
    font-size: 14px;
    cursor: pointer;
}

.voice-selector-item.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.voice-selector-item.active {
    border: 2px solid green;
}

.voice-selector-item.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 16px;
    height: 16px;
    background: white;
    color: green;
    border-radius: 50%;
    border: 1px solid green;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
}

.voice-selector-item.active .voice-selector-item-name {
    font-weight: bold;
    color: green;
}

.voice-selector-item.active .play-voice-selector-item-button {
    background-color: green;
}

.voice-selector audio {
    display: none;
}

.play-voice-selector-item-button {
    font-size: 9px;
    background-color: black;
    border-radius: 50%;
    line-height: 1;
    padding: 0px;
    width: 21px;
    height: 21px;
}

.play-voice-selector-item-button:hover, .play-voice-selector-item-button:focus {
    background-color: rgb(50, 50, 50);
    color: white;
}

.voice-select-button {
    max-width: 100%;
    background-color: white;
    color: black;
    border-radius: 5px;
    border: 2px solid lightgray;
    padding: 5px 20px;
    line-height: 1.5;
    text-align: center;
    font-size: 14px;
    font-weight: normal;
}

.voice-select-button:hover, .voice-select-button:focus {
    background-color: rgb(250, 250, 250);
    color: black;
    border: 2px solid black;
}

.voice-popup-container {
    position: fixed;
    display: none;
    justify-content: center;
    align-items: center;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.voice-popup-wrapper {
    position: relative;
}

.voice-popup-items {
    display: flex;
    align-items: center;
    flex-direction: column;
    background-color: white;
    min-width: 50vw;
    max-width: 90vw;
    max-height: 80vh;
    padding: 20px;
    position: relative;
    border-radius: 5px;
    overflow-y: auto;
}

.voice-items-title {
    font-size: 25px !important;
}

.voice-item-experimental-badge {
    display: block;
    font-size: 12px;
    color: darkmagenta;
}

.experimental-voice-notice {
    font-size: 14px;
    color: darkmagenta;
    line-height: 1.5;
    margin-bottom: 15px;
    font-style: italic;
    text-align: center;
}

.voice-search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    gap: 10px;
    border: 1px solid lightgray;
    border-radius: 5px;
    padding: 10px 5px;
    margin-bottom: 20px;
}

.voice-search-input {
    width: 100%;
    border: none !important;
    background-color: white !important;
    color: black;
    font-size: 18px;
    line-height: 1.5;
    padding: 0px !important;
    text-align: center;
}

.voice-search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    background-color: black;
    color: white;
    border-radius: 5px;
    padding: 10px;
}

.voice-search-button:hover, .voice-search-button:focus {
    background-color: rgb(34, 34, 34);
    color: white;
}

.voice-search-clear-button {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    font-size: 16px;
    background-color: white;
    border: 1px solid black;
    color: black;
    border-radius: 5px;
    padding: 5px;
}

.voice-search-clear-button:hover, .voice-search-clear-button:focus {
    background-color: whitesmoke;
    border: 1px solid red;
    color: black;
}

.total-tts-voice-count {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 5px;
    font-style: italic;
}

.voice-item-list {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 15px;
    flex-wrap: wrap;
}

.voice-popup-container[data-voice-type="standard"] .voice-item {
    width: calc(25% - 11.25px);
    border: 1px solid black;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
}

.voice-popup-container[data-voice-type="premium"] .voice-item {
    width: calc(33.33% - 10px);
    border: 1px solid black;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
}

.voice-item-template {
    display: none;
}

.voice-selector-item-template {
    display: none;
}

.voice-item-name {
    font-size: 18px !important;
    margin-bottom: 10px !important;
}

.voice-item-list-navigation {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.voice-item-list-navigation .page-numbers {
    background-color: white;
    border: 1px solid lightgray;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 16px;
    text-decoration: none !important;
}

.close-voice-popup-button {
    position: absolute;
    top: -12px;
    right: -12px;
    background-color: white;
    width: 30px;
    height: 30px;
    padding: 0px;
    border: 1px solid gray;
    border-radius: 50%;
    font-size: 20px;
    color: black;
    font-weight: bold;
}

.close-voice-popup-button:hover {
    color: white;
    background-color: red;
}

.regenerate-voice-button-wrapper {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    font-style: italic;
    color: rgb(51, 51, 51);
    line-height: 1.5;
}

.regenerate-voice-button-in-popup-wrapper {
    margin-top: 20px;
    margin-bottom: 5px;
    text-align: center;
    font-size: 16px;
    font-style: italic;
    line-height: 1.5;
}

.language-selector {
    text-align: center;
    margin-bottom: 20px;
}

.language-selector-title {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
}

.language-selector-select {
    text-align: center;
    border-radius: 5px;
    border: 1px solid lightgray;
    background-color: white;
    color: black;
    font-size: 18px;
    line-height: 1.5;
    padding: 5px 10px;
    max-width: 160px;
}

.speed-selector {
    text-align: center;
}

.speed-selector-title {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
}

.speed-selector .speed-selector-input {
    width: 100%;
    text-align: center;
    background-color: white;
    color: black;
    border: 1px solid lightgray;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 16px;
    line-height: 1.5;
    margin-top: 5px;
}

.to-convert-audio-wrapper {
    width: 100%;
}

.file-selector {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid darkgray;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 10px 2px rgba(0, 0, 0, 0.05);
}

.file-selector-title {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
}

.file-selector-button, .file-selector-button:hover, .file-selector-button:focus {
    border: 1px solid lightgray;
    background-color: white;
    color: black;
    border-radius: 5px;
    font-size: 18px;
    font-weight: normal;
    line-height: 1;
    padding: 7px 20px;
}

.file-selector input {
    display: none;
}

.file-selector audio {
    display: none;
}

.file-selector-description {
    text-align: center;
    font-size: 13px;
    font-style: italic;
    color: rgb(51, 51, 51);
    line-height: 1.5;
}

.result-section {
    display: none;
    align-items: center;
    justify-content: center;
}

.result-section-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 600px;
    max-width: 100%;
    padding: 30px;
    gap: 10px;
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid lightsalmon;
    border-radius: 10px;
}

.result-section button {
    font-size: 14px;
    background-color: black;
    padding: 8px 15px;
}

.result-section button:hover, .result-section button:focus {
    background-color: rgb(34, 34, 34);
    color: white;
}

.result-section audio {
    display: none;
    width: 100%;
}

.disclaimer-section {
    text-align: center;
    font-size: 14px;
    font-style: italic;
    color: rgb(40, 40, 40);
    line-height: 1.5;
}

.spinner {
    display: block;
    width: 80px;
    height: 80px;
    border: 8px solid lightgray;
    border-radius: 50%;
    border-top: 8px solid #3498db;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {

}