/* Phase 6 split from frontend/static/app.css */
/* Section: tts */

/* ---------- TTS Layout ---------- */
.tts-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

@media (max-width: 1100px) { .tts-layout { grid-template-columns: 1fr; } }

.tts-textarea {
    width: 100%;
    min-height: 180px;
    background: var(--bg-deep);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.tts-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.tts-textarea::placeholder { color: var(--text-muted); }

.tts-char-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.tts-builder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.tts-builder-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tts-builder-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tts-validate-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tts-validation-panel {
    margin-top: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-elevated, #0b1730);
    padding: 12px;
}

.tts-validation-panel.hidden { display: none; }

.tts-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tts-score-caption {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.tts-score-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.tts-score-pill.good { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.tts-score-pill.warn { background: rgba(245, 158, 11, 0.18); color: #f59e0b; }
.tts-score-pill.bad { background: rgba(239, 68, 68, 0.18); color: #f87171; }
.tts-score-pill.pending { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }

.tts-score-meter {
    margin-top: 6px;
    height: 8px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    overflow: hidden;
}

.tts-score-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fb7185, #f59e0b, #34d399);
    transition: width var(--transition-fast);
}

.tts-validation-status {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
}

.tts-validation-list {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 12px;
    color: var(--text-muted);
    list-style: disc;
}

.tts-validation-list li {
    margin-bottom: 4px;
}

.tts-validation-hint {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.tts-warning {
    border: 1px dashed rgba(251, 191, 36, 0.35);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 11px;
    color: var(--text-warning, #fde68a);
    margin-bottom: 12px;
    background: rgba(250, 204, 21, 0.08);
}

.tts-quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.tts-setting-group {
    margin-bottom: 16px;
}

.tts-setting-group:last-of-type { margin-bottom: 0; }

/* TTS History Item */
.tts-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.tts-history-item:last-child { border-bottom: none; }

.tts-history-icon { font-size: 20px; flex-shrink: 0; }

.tts-history-info { flex: 1; min-width: 0; }

.tts-history-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tts-history-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.tts-history-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
}
