Kokoro-FastAPI/web/styles/forms.css

376 lines
7.1 KiB
CSS
Raw Normal View History

.textarea-container {
position: relative;
width: 100%;
height: 100%;
}
.help-icon {
position: absolute;
top: 1rem;
right: 1rem;
color: var(--text-light);
cursor: pointer;
z-index: 2;
opacity: 0.7;
transition: opacity 0.3s ease;
}
.help-icon:hover {
opacity: 1;
}
.tooltip-content {
visibility: hidden;
opacity: 0;
position: absolute;
top: calc(100% + 10px);
right: 0;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 0.5rem;
padding: 1rem;
width: 300px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
0 2px 4px -1px rgba(0, 0, 0, 0.06);
z-index: 1000;
}
.help-icon:hover .tooltip-content {
visibility: visible;
opacity: 1;
transition: visibility 0s linear 0.2s, opacity 0.3s ease 0.2s;
}
.tooltip-content {
transition: visibility 0s linear 0.3s, opacity 0.3s ease;
}
.tooltip-content h4 {
margin: 0 0 0.5rem 0;
color: var(--text);
}
.tooltip-content ul {
margin: 0;
padding-left: 1.25rem;
color: var(--text-light);
}
.tooltip-content code {
background: rgba(99, 102, 241, 0.1);
padding: 0.125rem 0.25rem;
border-radius: 0.25rem;
font-family: monospace;
}
textarea {
width: 100%;
height: calc(100% - 50px);
padding: 1rem;
border: 1px solid var(--border);
border-radius: 0.5rem;
background: rgba(15, 23, 42, 0.3);
color: var(--text);
font-size: 1rem;
transition: border-color 0.2s ease;
font-family: var(--font-family);
resize: none;
margin-bottom: 0.75rem;
}
textarea:focus {
outline: none;
border-color: var(--fg-color);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
textarea::placeholder {
color: var(--text-light);
}
.text-controls {
display: flex;
gap: 0.75rem;
margin-top: auto;
}
.text-controls button {
flex: 1;
}
.voice-select-container {
position: relative;
display: flex;
flex-direction: column;
gap: 0.5rem;
z-index: 1001;
}
.voice-search {
width: 100%;
padding: 0.75rem 1rem;
border: 1px solid var(--border);
border-radius: 0.5rem;
background: rgba(15, 23, 42, 0.3);
color: var(--text);
font-size: 1rem;
transition: all 0.2s ease;
}
.voice-search:focus {
outline: none;
border-color: var(--fg-color);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.voice-search::placeholder {
color: var(--text-light);
}
.voice-dropdown {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 0.5rem;
margin-top: 0.5rem;
max-height: 200px;
overflow-y: auto;
z-index: 1000;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.voice-select-container:focus-within .voice-dropdown,
.voice-dropdown:hover {
display: block;
}
.voice-option {
display: flex;
align-items: center;
padding: 0.5rem;
cursor: pointer;
border-radius: 0.25rem;
transition: background-color 0.2s ease;
color: var(--text);
}
.voice-option:hover {
background: rgba(99, 102, 241, 0.1);
}
.selected-voices {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
margin-top: 0.5rem;
}
.selected-voice-tag {
background: rgba(99, 102, 241, 0.2);
padding: 0.25rem 0.4rem;
border-radius: 1rem;
font-size: 0.875rem;
display: flex;
align-items: center;
gap: 0.25rem;
border: 1px solid rgba(99, 102, 241, 0.3);
}
.selected-voice-tag input {
width: 3em;
padding: 0.1rem 0.2rem;
min-height: 1.5em;
background: transparent;
border: none;
color: inherit;
font-size: inherit;
}
.remove-voice {
cursor: pointer;
opacity: 0.7;
transition: opacity 0.2s ease;
}
.remove-voice:hover {
opacity: 1;
}
.options {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
flex-wrap: wrap;
padding: 0.5rem;
border-top: 1px solid var(--border);
border-bottom: 1px solid var(--border);
margin: 0.5rem 0;
}
.option-group {
display: flex;
align-items: center;
gap: 1rem;
}
.speed-control {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.speed-control label {
color: var(--text-light);
font-size: 0.875rem;
}
.speed-control input[type="range"] {
width: 150px;
height: 4px;
-webkit-appearance: none;
background: rgba(99, 102, 241, 0.2);
border-radius: 2px;
outline: none;
}
.speed-control input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 16px;
height: 16px;
background: var(--fg-color);
border-radius: 50%;
cursor: pointer;
transition: transform 0.2s ease;
}
.speed-control input[type="range"]::-webkit-slider-thumb:hover {
transform: scale(1.1);
}
.speed-control input[type="range"]::-moz-range-thumb {
width: 16px;
height: 16px;
background: var(--fg-color);
border: none;
border-radius: 50%;
cursor: pointer;
transition: transform 0.2s ease;
}
.speed-control input[type="range"]::-moz-range-thumb:hover {
transform: scale(1.1);
}
.options label {
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--text-light);
cursor: pointer;
}
.format-select {
background: rgba(15, 23, 42, 0.3);
color: var(--text);
border: 1px solid var(--border);
border-radius: 0.5rem;
padding: 0.5rem 1rem;
font-family: var(--font-family);
font-size: 0.875rem;
cursor: pointer;
transition: all 0.2s ease;
min-width: 100px;
}
.format-select:hover {
border-color: var(--fg-color);
}
.format-select:focus {
outline: none;
border-color: var(--fg-color);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.format-select option {
background: var(--surface);
color: var(--text);
}
.button-group {
margin-top: auto;
}
button {
background: var(--fg-color);
color: var(--text);
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
border: none;
font-weight: 500;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
width: 100%;
}
button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
button:disabled {
opacity: 0.7;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
.cancel-btn {
background: var(--error);
margin-top: 0.75rem;
}
.loader {
display: none;
width: 16px;
height: 16px;
border: 2px solid var(--text);
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.loading .loader {
display: inline-block;
}
.loading .btn-text {
display: none;
}
.clear-btn {
background: transparent !important;
border: 1px solid var(--border) !important;
color: var(--text-light) !important;
padding: 0.5rem 1rem !important;
}
.clear-btn:hover {
background: rgba(99, 102, 241, 0.1) !important;
transform: none !important;
box-shadow: none !important;
}