/* Shared layout for Text utilities converting A -> B */
.converter-grid { display: grid; grid-template-columns: 1fr 60px 1fr; gap: 1rem; align-items: stretch; margin-bottom: 2rem; }
@media (max-width: 800px) { .converter-grid { grid-template-columns: 1fr; } }

.io-pane { display: flex; flex-direction: column; gap: 0.5rem; }
.io-pane label { font-weight: 600; color: var(--text-main); display: flex; justify-content: space-between; align-items: center; }
.io-pane textarea { flex-grow: 1; padding: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text-main); font-family: monospace; font-size: 0.95rem; resize: vertical; min-height: 250px; outline: none; transition: border-color 0.2s; white-space: pre-wrap; }
.io-pane textarea:focus { border-color: var(--primary); }

.controls-pane { display: flex; flex-direction: column; justify-content: center; gap: 1rem; align-items: center; padding: 2rem 0; }
@media (max-width: 800px) { .controls-pane { flex-direction: row; padding: 1rem 0; } .controls-pane button { width: auto; flex: 1; } }

.pane-btn { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; }
@media (max-width: 800px) { .pane-btn { width: 100%; border-radius: 8px; height: 44px; gap: 0.5rem; } .pane-btn span { display: inline-block; } }
@media (min-width: 801px) { .pane-btn span { display: none; } }

/* For markdown output specifically */
.preview-box { flex-grow: 1; padding: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text-main); font-family: inherit; font-size: 1rem; overflow-y: auto; height: 100%; min-height: 250px; line-height: 1.6; }
.preview-box h1, .preview-box h2, .preview-box h3 { margin-top: 1rem; margin-bottom: 0.5rem; color: var(--text-main); }
.preview-box p { margin-bottom: 1rem; color: var(--text-muted); }
.preview-box pre { background: #0f172a; padding: 1rem; border-radius: 6px; overflow-x: auto; margin-bottom: 1rem; }
.preview-box code { font-family: monospace; color: #38bdf8; }
.preview-box ul, .preview-box ol { margin-left: 1.5rem; margin-bottom: 1rem; color: var(--text-muted); }
.preview-box blockquote { border-left: 4px solid var(--border); padding-left: 1rem; color: var(--text-muted); font-style: italic; margin-bottom: 1rem; }

/* TTS Specific Styles nested cleanly */
.tts-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (max-width: 500px) { .tts-controls { grid-template-columns: 1fr; } }
.tts-select { width: 100%; padding: 0.8rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text-main); outline: none; }
.tts-slider-group { display: flex; flex-direction: column; gap: 0.5rem; }
.tts-slider-group label { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.9rem; color: var(--text-main); }
.tts-slider-group input { accent-color: var(--primary); }
.playback-actions { display: flex; gap: 1rem; justify-content: stretch; }
.playback-actions button { flex: 1; }
