/* =============================================
   POS Verdulería — Productos (Edición Masiva)
   ============================================= */

/* Toolbar extra items */
.productos-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-base);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.productos-toolbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    flex: 1;
}

/* Modo Edición UI */
.table-edit-mode .editable-cell {
    position: relative;
    cursor: cell;
    transition: background var(--transition-fast);
}

.table-edit-mode .editable-cell:hover {
    background: rgba(139, 195, 74, 0.1); /* accent-light tint */
    box-shadow: inset 0 0 0 1px var(--color-accent-light);
}

.table-edit-mode .editable-cell.is-editing {
    padding: 0;
    background: var(--color-surface);
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

.table-edit-mode .editable-cell.is-modified {
    background: var(--color-warning-bg);
}

.table-edit-mode .editable-cell.is-modified::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-warning);
}

.table-edit-mode .is-modified-row td {
    background: rgba(245, 166, 35, 0.05); /* warning tint */
}

/* Inputs para edición inline */
.cell-edit-input {
    width: 100%;
    height: 100%;
    min-height: 40px;
    padding: var(--space-sm) var(--space-base);
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-family);
    font-size: var(--font-sm);
    color: var(--color-text);
}

.cell-edit-select {
    width: 100%;
    height: 100%;
    min-height: 40px;
    padding: var(--space-sm) var(--space-base);
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-family);
    font-size: var(--font-sm);
    color: var(--color-text);
    appearance: none;
    cursor: pointer;
}

/* Barra de Acciones (debajo de la tabla) */
.bulk-action-bar {
    display: none;
    background: var(--color-surface);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    padding: var(--space-sm) var(--space-md);
    align-items: center;
    gap: var(--space-base);
    justify-content: center;
    border: 1px solid var(--color-border);
    margin-top: var(--space-md);
}

.bulk-action-bar.visible {
    display: flex;
}

.bulk-action-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0 var(--space-sm);
    font-size: var(--font-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

.bulk-action-count {
    background: var(--color-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-xs);
}

/* Tooltip info de edición masiva */
.edit-mode-hint {
    background: var(--color-info-bg);
    color: var(--color-info);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-base);
    font-size: var(--font-sm);
}

.edit-mode-hint ul {
    margin: var(--space-xs) 0 0;
    padding-left: var(--space-lg);
}

/* Modal de resumen */
.changes-summary-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}

.change-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.change-item:last-child {
    border-bottom: none;
}

.change-item-title {
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.change-detail {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-sm);
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.change-old {
    text-decoration: line-through;
    color: var(--color-text-muted);
}

.change-arrow {
    color: var(--color-text-muted);
}

.change-new {
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
}
