/* Notes Section */

.notes-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header: form + toggle */
.notes-header {
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Form */
.notes-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-form__input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-bg);
    outline: none;
    min-width: 0;
}

.notes-form__input:focus {
    border-color: var(--color-primary);
}

.notes-form__btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notes-form__btn:hover {
    background: var(--color-hover);
    color: var(--color-text);
}

.notes-form__btn--primary {
    background: var(--color-primary);
    color: white;
}

.notes-form__btn--primary:hover {
    background: var(--color-primary-light);
}

/* Toggle */
.notes-toggle {
    display: flex;
    gap: 4px;
}

.notes-toggle__btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.notes-toggle__btn:hover {
    background: var(--color-hover);
    color: var(--color-text);
}

.notes-toggle__btn--active {
    background: var(--color-primary);
    color: white;
}

.notes-toggle__btn--active:hover {
    background: var(--color-primary-light);
}

/* Notes list */
.notes-list-container {
    flex: 1;
    overflow-y: auto;
}

.notes-list {
    display: flex;
    flex-direction: column;
}

.notes-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.notes-empty p {
    margin: 0;
}

/* Note item - simple line */
.note-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

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

.note-item--active .note-item__time {
    background: var(--color-secondary);
    color: white;
}

.note-item__time {
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-bg);
    padding: 3px 7px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
}

.note-item__time:hover {
    background: var(--color-secondary);
    color: white;
}

.note-item__text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--color-text);
    line-height: 1.4;
    min-width: 0;
    word-break: break-word;
}

.note-item__text .timestamp-link {
    font-family: monospace;
    font-size: 0.8em;
    color: var(--color-primary);
    background: var(--color-bg);
    padding: 1px 4px;
    border-radius: 2px;
    cursor: pointer;
}

.note-item__text .timestamp-link:hover {
    background: var(--color-secondary);
    color: white;
}

.note-item__actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    flex-shrink: 0;
}

.note-item:hover .note-item__actions {
    opacity: 1;
}

.note-item__action {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.note-item__action:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.note-item__action.note-action-btn--delete:hover {
    color: #dc2626;
}

/* Edit mode */
.note-item--editing {
    gap: 8px;
}

.note-edit-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    outline: none;
    min-width: 0;
}

.note-edit-input:focus {
    border-color: var(--color-primary);
}

/* Touch devices */
@media (hover: none) {
    .note-item__actions {
        opacity: 1;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .notes-header {
        padding: 10px;
    }

    .note-item {
        padding: 8px 10px;
    }

    .note-item__actions {
        opacity: 1;
    }
}
