/* Notes Styles */

.notes-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.notes-filter select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.search-box {
    display: flex;
    flex: 1;
    gap: 5px;
}

.search-box input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.search-box button {
    padding: 8px 12px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.note-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.note-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.note-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.note-item-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
    min-width: 0;
    /* Prevent flex item from overflowing */
}

.note-item-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-title:hover {
    color: var(--primary-color);
}

.pinned-tag {
    margin-right: 5px;
}

.note-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #999;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.note-item-date {
    font-size: 0.8rem;
    color: #aaa;
}

.note-item-summary {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-item-footer {
    display: flex;
}

.note-group-tag {
    background: #f0f2f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Mobile Layout */
@media (max-width: 600px) {
    .note-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .note-item-title-wrapper {
        width: 100%;
        margin-bottom: 2px;
    }

    .note-meta {
        width: 100%;
        justify-content: space-between;
        /* Spread views and date across width */
        font-size: 0.8rem;
    }
}