/* ── Global notes modal (components/notes_modal.py) ──────────────── */
.notes-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.notes-modal-overlay--hidden {
    display: none;
}

.notes-modal-dialog {
    width: min(480px, calc(100vw - 48px));
    max-height: min(600px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(var(--color-shadow-rgb), 0.3);
    overflow: hidden;
}

.notes-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
}

.notes-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-main);
}

.notes-modal-close-btn {
    padding: 2px 7px;
    background: none;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
}

.notes-modal-close-btn:hover {
    color: var(--color-accent);
    background-color: rgba(var(--color-accent-rgb), 0.08);
}

.notes-modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    min-height: 0;
    overflow-y: auto;
}

.notes-modal-display {
    min-height: 70px;
    padding: 8px 10px;
    background-color: var(--color-bg-page);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--color-text-main);
    white-space: pre-wrap;
}

.notes-modal-display--hidden {
    display: none;
}

.notes-modal-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12.5px;
    color: var(--color-text-muted);
}

.notes-modal-textarea {
    width: 100%;
    min-height: 70px;
    padding: 8px 10px;
    font-family: var(--font-family);
    font-size: 13px;
    background-color: var(--color-bg-page);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    resize: vertical;
}

.notes-modal-textarea--hidden {
    display: none;
}

.notes-modal-textarea:focus {
    outline: none;
    border-color: var(--color-accent-light);
}

.notes-modal-actions {
    display: flex;
    justify-content: flex-end;
}

.notes-modal-edit-btn,
.notes-modal-save-btn {
    padding: 6px 16px;
    background-color: var(--color-accent);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}

.notes-modal-edit-btn:hover,
.notes-modal-save-btn:hover {
    opacity: 0.88;
}

.notes-modal-edit-btn--hidden,
.notes-modal-save-btn--hidden {
    display: none;
}

/* ── Tools > Notes page (pages/tools_notes.py) ────────────────────── */
.notes-filters-panel {
    margin-top: 8px;
    max-width: 820px;
    align-items: center;
}

.notes-only-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
}

.notes-tabs {
    display: flex;
    gap: 4px;
    background-color: var(--color-bg-page);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 3px;
}

.notes-tab {
    padding: 5px 16px;
    background: none;
    border: none;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
}

.notes-tab:hover {
    color: var(--color-text-main);
}

.notes-tab.active {
    background-color: var(--color-bg-surface);
    color: var(--color-accent);
    box-shadow: 0 1px 3px rgba(var(--color-shadow-rgb), 0.15);
}

/* Reused sidebar-card info line, for the "N notes"/"No notes" line
   pages/tools_notes.py's _notes_card appends. */
.pe-sidebar-card-line.has-notes {
    color: var(--color-accent);
    font-weight: 600;
}

/* White instead of the base .pe-sidebar-card's grey — same reason as
   .ds-card in assets/07_dropout_selection.css: this page's content area
   has no white panel wrapping the grid the way .pe-sidebar does on
   Project Evaluation, so grey-on-grey made cards blend into the page. */
.notes-card {
    background-color: var(--color-bg-surface);
}
