/* Notes */

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.note-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    border-left: 4px solid rgba(188, 200, 218, 0.3);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition:
        transform 0.14s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease;
}
.note-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.note-card.pinned {
    border-left-color: var(--warning);
    background: linear-gradient(180deg, var(--warning-soft) 0%, var(--surface) 100%);
}

.note-card-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.note-card-title {
    flex: 1;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text-1);
}

.note-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.note-card-content {
    flex: 1;
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.note-card-date {
    margin-top: auto;
    font-size: 11px;
    color: var(--text-4);
}

.btn-pin {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.62;
    transition: opacity 0.16s ease;
}
.btn-pin:hover {
    opacity: 1;
}

.btn-copy-note {
    background: none;
    border: none;
    padding: 2px 5px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-4);
    border-radius: 6px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    opacity: 0;
}
.note-card:hover .btn-copy-note {
    opacity: 1;
}
@media (hover: none) {
    .btn-copy-note {
        opacity: 0.7;
    }
}
.btn-copy-note:hover {
    color: var(--accent);
    background: var(--accent-soft);
}
.btn-copy-note.copied {
    color: var(--success);
    opacity: 1;
}

/* Note inline editing */

.note-card--editing {
    cursor: default;
    border-color: rgba(79, 104, 232, 0.40);
    box-shadow: 0 0 0 3px rgba(79,104,232,0.10), var(--shadow-md);
}
.note-card--editing:hover {
    transform: none;
}

.note-edit-title {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-1);
    outline: none;
    transition: border-color 0.14s ease;
}
.note-edit-title:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,104,232,0.12);
}

.note-edit-content {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.55;
    resize: vertical;
    font-family: inherit;
    outline: none;
    transition: border-color 0.14s ease;
}
.note-edit-content:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,104,232,0.12);
}

.note-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
