/* Notes Theme Fix v5 — Full writing space */

/* === THEME COLORS === */
.notes-document-page {
    background: color-mix(in srgb, var(--bg-secondary) 90%, var(--accent) 3%) \!important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08) \!important;
    max-width: 100% \!important;
    padding: 32px 48px 60px \!important;
    border-radius: 0 \!important;
    min-height: 100% \!important;
    height: auto \!important;
}

.notes-document-page:focus-within {
    box-shadow: 0 1px 6px rgba(0,0,0,0.08) \!important;
}

.notes-document-scroll {
    background: var(--bg-primary) \!important;
    padding: 0 \!important;
}

.notes-app-editor {
    background: var(--bg-primary) \!important;
}

.notes-toolbar-sticky {
    background: var(--bg-secondary) \!important;
    border-bottom-color: var(--border) \!important;
}

.notes-document-footer {
    background: var(--bg-secondary) \!important;
    border-top-color: var(--border) \!important;
}

.notes-app-sidebar {
    background: var(--bg-secondary) \!important;
    border-right-color: var(--border) \!important;
}

.note-title-h1 {
    color: var(--text) \!important;
    font-size: 26px \!important;
    padding: 8px 0 \!important;
}

.notes-doc-header {
    border-bottom-color: var(--border) \!important;
    margin-bottom: 16px \!important;
    padding-bottom: 12px \!important;
}

.notes-doc-meta {
    font-size: 12px \!important;
    opacity: 0.6 \!important;
}

.notes-doc-header-actions {
    opacity: 0.7 \!important;
}
.notes-doc-header-actions:hover {
    opacity: 1 \!important;
}

/* === THE FIX: textarea must grow with content === */

.note-content-area,
.note-textarea,
textarea.note-textarea,
textarea.note-content-area,
#notes-main-textarea {
    color: var(--text) \!important;
    min-height: calc(100vh - 300px) \!important;
    overflow-y: auto \!important;
    overflow-x: hidden \!important;
    font-size: 16px \!important;
    line-height: 1.9 \!important;
    width: 100% \!important;
    display: block \!important;
    resize: none \!important;
    padding: 4px 0 200px \!important;
    background: transparent \!important;
    border: none \!important;
    outline: none \!important;
    box-sizing: border-box \!important;
    /* CRITICAL: remove any inline height set by JS */
    height: auto \!important;
    max-height: none \!important;
    field-sizing: content \!important;
}

.note-content-area::placeholder {
    color: var(--text-muted, rgba(255,255,255,0.3)) \!important;
    font-style: italic \!important;
}

.notes-doc-content {
    flex: 1 \!important;
    min-height: 0 \!important;
}
