/* Reusing core variables from chat.css */
@import url('chat.css');

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Karaoke Highlight */
.word {
    transition: background-color 0.2s, color 0.2s;
    border-radius: 2px;
    padding: 0 1px;
    cursor: default;
}

.word.highlight {
    background-color: var(--accent);
    color: var(--accent-text);
}

.karaoke-display {
    width: 100%;
    min-height: 150px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap; /* Preserve whitespace like textarea */
    overflow-y: auto;
    cursor: pointer; /* Indicate it's clickable to edit */
    display: none; /* Hidden by default */
    resize: vertical; /* Allow resizing like textarea */
}

.karaoke-display:hover {
    border-color: var(--accent);
}

.audio-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audio-item-header {
    display: flex;
    justify-content: flex-end; /* Just delete button now */
    align-items: center;
    gap: 1rem;
}

/* Old text content in output is removed, but keeping style just in case of rollback or other uses */
.audio-text-content {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    display: none; /* Hide by default as requested */
}

.delete-audio-btn {
    flex-shrink: 0;
}

/* Custom Scrollbar to match Dark/Modern theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text);
}

/* Specific TTS Overrides */

.model-selector {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    cursor: pointer;
}

.model-selector:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(62, 166, 255, 0.1);
}

.model-selector-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.model-list-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s;
}

.model-list-item:hover {
    border-color: var(--accent);
    background: var(--bg);
}

.model-list-item.active {
    border-color: var(--accent);
    background: rgba(62, 166, 255, 0.1);
    color: var(--accent);
    font-weight: 500;
}

.model-icon-sm {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    line-height: 1;
}

.model-name {
    font-size: 0.85rem;
}

.tts-container {
    flex: 1;
    overflow-y: auto;
    /* Match chat.css centering logic */
    padding: var(--spacing) max(1rem, calc((100% - 900px) / 2));
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%; /* Ensure it fills the parent */
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); /* Match chat message shadow */
}

.card h2 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    color: var(--text);
}

/* Output Header Alignment */
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Progress Dialog - Matched with Transcribe/Chat */
.progress-dialog {
    border: none;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 0;
    width: 90%;
    max-width: 400px;
    text-align: left;
    overflow: hidden;
}

.progress-dialog::backdrop {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.progress-content {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.progress-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.progress-label { 
    margin-bottom: 0.5rem; 
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    white-space: pre-wrap;
    max-width: 100%;
    word-break: break-word;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: var(--surface-hover);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.2s ease;
}
