/* ItemRow Molecule */
/* Compact data row: left content (icon, label, badges) + right actions (buttons) */
/* Used within panels for menu items, meal services, config items, tree children */

/* SPACING CONTRACT:
   - Internal: --space-2 vertical, --space-3 horizontal
   - External: NONE -- parent list controls gap
   - Hover: --bg-layer-3 */

.item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--border-radius-md);
    transition: background 0.1s;
}

.item-row:hover {
    background: var(--bg-layer-3);
}

/* Subdued state (unavailable / disabled items) */
.item-row-subdued {
    opacity: 0.5;
}

/* Indented for child items in tree structures */
.item-row-indented {
    padding-left: var(--space-6);
}

/* Content area (left side) */
.item-row-content {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
    min-width: 0;
}

.item-row-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-row-secondary {
    font-size: var(--text-sm);
    color: var(--text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-row-badges {
    display: flex;
    gap: var(--space-1);
    align-items: center;
    flex-shrink: 0;
}

/* Actions area (right side) */
.item-row-actions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-shrink: 0;
}

/* List container */
.item-row-list {
    display: flex;
    flex-direction: column;
}

/* Bordered variant for lists where rows need separators */
.item-row-list-bordered .item-row {
    border-bottom: var(--border-width-1) solid var(--border-subtle);
}

.item-row-list-bordered .item-row:last-child {
    border-bottom: none;
}

/* Empty state */
.item-row-list-empty {
    font-size: var(--text-sm);
    color: var(--text-muted);
    padding: var(--space-2) var(--space-3);
}
