/* Text Utilities - Minimal custom CSS */

/* Print-only content: hidden on screen, visible when printing */
.print-only { display: none; }

/* Markdown preview styling */
.markdown-preview {
    min-height: calc(100vh - 300px);
    overflow-y: auto;
}

/* Editor textarea - min viewport height, grows with content via JS */
textarea.markdown-textarea {
    min-height: calc(100vh - 300px);
    overflow: hidden;
}

.markdown-preview h1 { font-size: 1.75rem; margin-top: 1rem; margin-bottom: 0.5rem; }
.markdown-preview h2 { font-size: 1.5rem; margin-top: 1rem; margin-bottom: 0.5rem; }
.markdown-preview h3 { font-size: 1.25rem; margin-top: 0.75rem; margin-bottom: 0.5rem; }
.markdown-preview h4 { font-size: 1.1rem; margin-top: 0.5rem; margin-bottom: 0.25rem; }

.markdown-preview p { margin-bottom: 0.75rem; }
.markdown-preview ul, .markdown-preview ol { margin-bottom: 0.75rem; padding-left: 1.5rem; }
.markdown-preview li { margin-bottom: 0.25rem; }

.markdown-preview code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.markdown-preview pre {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.75rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin-bottom: 0.75rem;
}

.markdown-preview pre code {
    background: none;
    padding: 0;
}

.markdown-preview blockquote {
    border-left: 3px solid #dee2e6;
    padding-left: 1rem;
    margin-left: 0;
    color: #6c757d;
}

.markdown-preview a { color: #0d6efd; }
.markdown-preview hr { margin: 1rem 0; }

.markdown-preview table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.markdown-preview th, .markdown-preview td { border: 1px solid #dee2e6; padding: 0.5rem 0.75rem; text-align: left; }
.markdown-preview th { background-color: rgba(0, 0, 0, 0.03); font-weight: 600; }

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Print styles: only show the rendered markdown */
@media print {
    .no-print, nav, #app-loading, footer { display: none !important; }
    .print-only {
        display: block !important;
        min-height: auto;
        overflow: visible;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .print-only h1 { font-size: 2em; }
    .print-only h2 { font-size: 1.5em; }
    .print-only h3 { font-size: 1.25em; }
    .print-only table { page-break-inside: auto; }
    .print-only tr { page-break-inside: avoid; }
}
