20cdbd69eb
Functional fixes: - Add isDirtyRef to distinguish user edits from note selection; auto-save now only fires after the user actually modifies content, not on every click - Add selected and isNew to auto-save effect deps so the closure is never stale when switching between notes (previously could save to the wrong note) - Double-check isDirtyRef inside the debounce callback to handle rapid note switches within the 1-second window - Reset isDirtyRef to false after every successful save (manual and auto) CSS fixes: - Add button.ghost and button.ghost.danger styles to buttons.css; delete button was invisible/identical to the save button because .ghost was never defined - Add select element styling to base.css to match input/textarea theming; language picker was unstyled browser-default in both dark and light mode - Add .error class (red text) to base.css; error messages had no colour - Add .notes-layout grid class with responsive media query (stacks below 680px); remove inline gridTemplateColumns that overflowed on small screens Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
57 lines
1.1 KiB
CSS
57 lines
1.1 KiB
CSS
button {
|
|
padding: 12px 18px;
|
|
border-radius: 14px;
|
|
border: 1px solid transparent;
|
|
margin: 6px 4px;
|
|
cursor: pointer;
|
|
font-weight: 600;
|
|
font-size: 1rem;
|
|
letter-spacing: 0.01em;
|
|
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
|
|
color: #0b1224;
|
|
box-shadow: 0 12px 30px rgba(14, 165, 233, 0.32);
|
|
transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
|
|
}
|
|
|
|
button:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 16px 32px rgba(14, 165, 233, 0.38);
|
|
filter: brightness(1.03);
|
|
}
|
|
|
|
button:active {
|
|
transform: translateY(0);
|
|
box-shadow: 0 10px 20px rgba(14, 165, 233, 0.28);
|
|
}
|
|
|
|
button:disabled {
|
|
opacity: 0.55;
|
|
cursor: not-allowed;
|
|
box-shadow: none;
|
|
}
|
|
|
|
button.ghost {
|
|
background: transparent;
|
|
color: var(--text);
|
|
border-color: var(--border);
|
|
box-shadow: none;
|
|
}
|
|
|
|
button.ghost:hover {
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
box-shadow: none;
|
|
filter: none;
|
|
}
|
|
|
|
button.ghost.danger {
|
|
color: #ef4444;
|
|
border-color: #ef4444;
|
|
}
|
|
|
|
button.ghost.danger:hover {
|
|
background: rgba(239, 68, 68, 0.1);
|
|
color: #ef4444;
|
|
border-color: #ef4444;
|
|
}
|