/* ═══════════════════════════════════════════════════════════════════════
   THE NOTES DIALOG — one dialog, one class family, every kind.
   js/views/NotesDialog.js opens it with a kind; the shell carries
   data-kind="verse|commentary|intro|library|isbe|harmony". The two
   per-kind looks (gold accent, wider shell) key on that attribute below.
   Speaks ONLY theme tokens. No hex, no rgb.

   The header bar is the one header bar (css/modal-header.css) — nothing
   here styles it except the drag cursor.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Dialog shell ── */
.notes-dialog {
    display: none;
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    max-width: 90vw;
    max-height: 70vh;
    background: var(--surface);
    /* corners: .modal-shell (css/modal-header.css) */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    z-index: 25000;
    flex-direction: column;
    overflow: hidden;
    animation: notesDialogIn 0.2s ease;
}
.notes-dialog[data-kind="isbe"],
.notes-dialog[data-kind="harmony"] { width: 440px; }

@keyframes notesDialogIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Header: the one header bar; only the drag cursor is ours ── */
.notes-dialog-header {
    cursor: grab;
    user-select: none;
}

/* ── Body ── */
.notes-dialog-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    max-height: 40vh;
}

.note-dialog-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
}

/* ── Footer (new-note area) ── */
.notes-dialog-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--background);
    border-radius: 0;
}

.note-new-textarea,
.note-edit-textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.875rem;
    background: var(--surface);
    color: var(--text-primary);
    box-sizing: border-box;
}
.note-edit-textarea { border-radius: 4px; }

.note-add-submit-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    width: 100%;
}

/* ── Note items ── */
.note-dialog-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--highlight);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.note-dialog-item.editing { border: 2px solid var(--primary); }

.note-item-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    margin-bottom: 0.5rem;
}

.note-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-item-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.note-item-actions {
    display: flex;
    gap: 0.25rem;
}

.note-edit-btn,
.note-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}
.note-edit-btn { color: var(--primary); }
.note-delete-btn { color: var(--danger); }

.note-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.note-save-btn,
.note-cancel-btn {
    padding: 0.375rem 0.75rem;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}
.note-save-btn { background: var(--primary); }
.note-cancel-btn { background: var(--text-secondary); }

/* ── Variant: commentary and intro notes accent in gold (as before) ── */
.notes-dialog[data-kind="commentary"] .note-add-submit-btn,
.notes-dialog[data-kind="intro"] .note-add-submit-btn,
.notes-dialog[data-kind="commentary"] .note-save-btn,
.notes-dialog[data-kind="intro"] .note-save-btn { background: var(--gold); }
.notes-dialog[data-kind="commentary"] .note-edit-btn,
.notes-dialog[data-kind="intro"] .note-edit-btn { color: var(--gold-text); }
.notes-dialog[data-kind="commentary"] .note-dialog-item.editing,
.notes-dialog[data-kind="intro"] .note-dialog-item.editing { border-color: var(--gold); }
