/* NeoLong Notes — live markdown editor */

:root {
    --notes-bg: #050505;
    --notes-surface: #0c0c0c;
    --notes-border: rgba(235, 235, 245, 0.42);
    --notes-glow: rgba(220, 220, 235, 0.14);
    --notes-text: #c8c8c8;
    --notes-muted: #6f6f6f;
    --notes-accent: #4fd1c5;
    --tone-red: #b86a72;
    --tone-green: #6a9f7a;
    --tone-blue: #6a8fb8;
    --tone-yellow: #e8d87c;
    --tone-dark: #5a5a5a;
}

#notesSource {
    display: none !important;
}

.notes-shell {
    width: 100%;
    border: 1px solid var(--notes-border);
    border-radius: 16px;
    background: var(--notes-surface);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 28px var(--notes-glow),
        0 0 64px rgba(180, 180, 210, 0.06);
    overflow: hidden;
}

.notes-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
            padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(8, 8, 8, 0.92);
}

.notes-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-right: 10px;
    margin-right: 2px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.notes-toolbar-group:last-child {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

.fmt-btn {
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    background: rgba(14, 14, 14, 0.9);
    color: #8a8a8a;
    font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.fmt-btn:hover {
    color: #e0e0e0;
    border-color: #484848;
    background: rgba(22, 22, 22, 0.95);
}

.fmt-btn.fmt-bold { font-weight: 700; }
.fmt-btn.fmt-italic { font-style: italic; }
.fmt-btn.fmt-underline { text-decoration: underline; }
.fmt-btn.fmt-strike { text-decoration: line-through; }
.fmt-btn.fmt-indent {
    min-width: 34px;
    font-size: 10px;
    letter-spacing: 0.2px;
}
.fmt-btn.fmt-divider {
    min-width: 36px;
    letter-spacing: 0;
    color: #6d7f92;
}

.fmt-color {
    width: 14px;
    height: 14px;
    min-width: 14px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45) inset;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.fmt-color:hover {
    border-color: rgba(255, 255, 255, 0.28);
    transform: scale(1.08);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.06);
}

.fmt-color[data-tone="dark"] { background: var(--tone-dark); }
.fmt-color[data-tone="red"] { background: var(--tone-red); }
.fmt-color[data-tone="green"] { background: var(--tone-green); }
.fmt-color[data-tone="blue"] { background: var(--tone-blue); }
.fmt-color[data-tone="yellow"] { background: var(--tone-yellow); }

#notesEditor {
    width: 100%;
    min-height: clamp(420px, 58vh, 780px);
    max-height: clamp(420px, 58vh, 780px);
    overflow-y: auto;
    padding: 14px 12px;
    box-sizing: border-box;
    color: var(--notes-text);
    line-height: 1.72;
    font-size: 15px;
    outline: none;
    cursor: text;
    border: none;
    background: transparent;
    white-space: pre-wrap;
    word-break: break-word;
}

#notesEditor:focus {
    outline: none;
}

#notesEditor .md-line {
    margin: 0 0 4px 0;
    min-height: 1.72em;
    white-space: pre-wrap;
    overflow: visible;
}

#notesEditor .md-line[data-indent] {
    padding-left: 0;
}

#notesEditor .md-line.md-gap-line {
    min-height: 0.55em;
    margin-bottom: 4px;
}

#notesEditor .md-line.md-heading {
    color: #ededed;
    margin: 12px 0 6px;
    letter-spacing: 0.2px;
}

#notesEditor .md-h1 { font-size: 1.45em; }
#notesEditor .md-h2 { font-size: 1.28em; }
#notesEditor .md-h3 { font-size: 1.1em; }
#notesEditor .md-h4 { font-size: 0.95em; }

#notesEditor .md-size-lg { font-size: 1.22em; }
#notesEditor .md-size-sm { font-size: 0.88em; }

#notesEditor .md-tone-dark { color: var(--tone-dark); }
#notesEditor .md-tone-red { color: var(--tone-red); }
#notesEditor .md-tone-green { color: var(--tone-green); }
#notesEditor .md-tone-blue { color: var(--tone-blue); }
#notesEditor .md-tone-yellow { color: var(--tone-yellow); }

#notesEditor strong, #notesEditor b {
    color: #f0f0f0;
    font-weight: 600;
}

#notesEditor em, #notesEditor i {
    color: #dadada;
    font-style: italic;
}

#notesEditor u {
    text-decoration: underline;
    text-underline-offset: 2px;
}

#notesEditor s, #notesEditor del, #notesEditor strike {
    opacity: 0.72;
    text-decoration: line-through;
}

#notesEditor code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.94em;
    background: rgba(255, 255, 255, 0.05);
    padding: 0 4px;
    border-radius: 2px;
}

#notesEditor .wap-dateline {
    margin: 10px 0;
    padding: 6px 10px;
    border-top: 1px solid #232323;
    border-bottom: 1px solid #232323;
    color: #8a8a8a;
    font-size: 11px;
    letter-spacing: 0.35px;
}

#notesEditor .md-divider {
    margin: 16px 0 12px;
    padding: 2px 0;
    color: #6d7f92;
    font-family: 'Courier New', Courier, monospace;
    font-size: 10.5px;
    letter-spacing: 0.55px;
    text-align: left;
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    text-shadow: 0 0 18px rgba(109, 127, 146, 0.18);
}

#notesEditor .md-divider::selection {
    background: rgba(79, 209, 197, 0.22);
}

#notesEditor .md-file-thumb-link {
    display: inline-block;
    max-width: 300px;
    max-height: 200px;
    margin: 6px 0;
    vertical-align: middle;
    line-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
    background: #101010;
}

#notesEditor .md-file-thumb {
    display: block;
    max-width: 300px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

#notesEditor .md-file-icon-link {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin: 0 3px;
    line-height: 0;
}

#notesEditor .md-file-icon {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}
    content: "Start typing your notes…";
    color: #555;
    opacity: 0.75;
    pointer-events: none;
}

.notes-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 6px 8px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
